Closed Bug 746640 Opened 13 years ago Closed 2 months ago

Popup window.open() blocked when called from a key-related event listener

Categories

(Core :: DOM: Core & HTML, defect, P3)

11 Branch
x86
macOS
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: kloots, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: access, parity-chrome, parity-safari)

Attachments

(2 files, 1 obsolete file)

Attached file popupblocker.html
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.5 Safari/534.55.3 Steps to reproduce: I'm adding keyboard shortcuts for an application. These shortcuts are for sharing news articles on Facebook, Twitter, etc. Each shortcut makes a call to window.open() to popup a window to the associated services sharing page. Actual results: The popup window initiated from the call to window.open() is blocked when called from a key-related (keypress, keydown, or keyup) event listener. Expected results: The popup window should not have been blocked in my opinion. The call to window.open() was initiated from a real user action. And Firefox doesn't block popups called from within a "click" event listener for example. So, it seems like they should not be blocked when called from within a key-related event listener.
One additional note: I've noticed that popup windows aren't blocked when the call to window.open() originates from a key event in Webkit.
Status: UNCONFIRMED → NEW
Component: Untriaged → General
Ever confirmed: true
Keywords: access
QA Contact: untriaged → general
Whiteboard: [parity webkit]
This should be an issue of DOM component.
Component: General → DOM: Core & HTML
Product: Firefox → Core
Whiteboard: [parity webkit] → [parity-blink][parity-webkit]
Attached file simplified testcase
And this is a simplified testcase shows that Firefox bans window.open in keypress event.
See Also: → 1425419
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Whiteboard: [parity-blink][parity-webkit]
Priority: -- → P3
Severity: normal → S3
Attachment #9383497 - Attachment is obsolete: true

Like bug 1863217, the bug 746640 testcase works after enabling dom.popup.experimental (enabled in Nightly as of bug 1911736).

Depends on: 1656444
Attachment #616194 - Attachment mime type: text/plain → text/html

Close per comment #8. Thanks for verifying this, Zach!

Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED

You bet!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: