Keypress not recognised as user event for popup blocker
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: gyoung, Unassigned)
References
(Depends on 1 open bug, )
Details
(Whiteboard: [domcore-bugbash-triaged])
Comment 1•20 years ago
|
||
Comment 2•20 years ago
|
||
Reporter | ||
Updated•20 years ago
|
Reporter | ||
Comment 3•20 years ago
|
||
Comment 4•19 years ago
|
||
Comment 5•18 years ago
|
||
Updated•15 years ago
|
Updated•6 years ago
|
I can confirm that this behavior happens in Firefox 81, and not in Chrome 88. This affects my website, since I trigger a popup with the ENTER key, but it gets blocked in Firefox (and works in Chrome).
Same here. I want to open a new tab on special keyboard shortcuts.
Works well in Chrome and Edge. Only Firefox still rejects to open a new tab even on user input.
Seems opening new tabs is only allowed on mouse left. Not on key input and also not on mouse right.
Updated•2 years ago
|
Comment 8•1 year ago
|
||
The test page at the provided URL is no longer available. Could someone create a new test page?
Comment 9•1 year ago
|
||
Here's a basic example: https://codepen.io/devongovett/pen/qBLVoVL. Pressing enter in the text field should open a new tab. This works in Chrome and Safari but is blocked in Firefox.
Comment 10•1 year ago
|
||
Note, if you modify the dom.popup_allowed_events
setting in about:config to include keydown then it works, so maybe the default setting just needs to be updated?
Comment 11•1 year ago
|
||
I agree. The default value of that config already includes 13 events*, so it’s not like Firefox is being very restrictive when it comes to allowing window.open() in response to a user event. This seems like an oversight to include keyboard events in that list.
*change click dblclick auxclick mousedown mouseup pointerdown pointerup notificationclick reset submit touchend contextmenu
Comment 12•1 year ago
|
||
We think bug 1656444 would help this issue. We should verify the issue after that bug.
As comment 10 suggests, modifying dom.popup_allowed_events
is a workaround for now.
Updated•1 year ago
|
Comment 13•1 year ago
|
||
That's only a workaround for users not web developers. It is not really feasible for web sites to ask users to change an advanced Firefox setting to work around an issue. Is there a downside to simply adding keydown keypress keyup
to the default for that setting in the meantime?
Comment 14•4 months ago
|
||
Doing domcore-random bug triage - comment 12 is still valid.
Description
•