"Opening multiple popups was blocked due to lack of user activation" when JS-focussing user activated popup window
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr78 | --- | unaffected |
| firefox87 | --- | wontfix |
| firefox88 | --- | wontfix |
| firefox89 | --- | fixed |
People
(Reporter: mnyromyr, Assigned: emilio)
References
(Regression)
Details
(Keywords: perf-alert, regression, Whiteboard: [perf:alert:?])
Attachments
(3 files)
FF 88b on Linux with default popup blocking settings, i.e. dom.disable_window_flip is true.
Setting & former expected outcome:
HTML with button to open a popup and JS code to redirect user interaction from the opener to the popup (see attached demo).
Clicking the button would open the popup, clicking somewhere else in the opener window would then just refocus the popup.
This did still work in FF 84.0.2, but not from 85.0 onwards, and is currently still broken in 88 beta. It (still) works in other browsers, e.g. Chrome 89.0.4389.114.
Currently broken behaviour:
Opening the popup by clicking the button will open the popup, but subsequent clicks into the opener window won't refocus the popup. Instead, they just generate an "Opening multiple popups was blocked due to lack of user activation" on the popup's(!) JS console, relating to the .focus call.
Since the popup was opened by a user action, it should allow .focus calls.
(Note: the demo is based on code taken from Xinha 0.95's dialog.js, stripped down to the broken part.)
Comment 1•5 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
| Assignee | ||
Comment 2•5 years ago
|
||
Are you using wayland by any chance? This is supposed to work (I fixed this in bug 1691214, basically), and does work on OSX and X11 at least, but it's known not to work on wayland because of bug 1692119.
| Reporter | ||
Comment 3•5 years ago
|
||
loginctl says Type=x11, so no.
I'm on lubuntu 20.10 with LXDE, fwiw.
Does my testcase work for you?
| Assignee | ||
Comment 4•5 years ago
|
||
It does (on Nightly and 87 at least). ni?ing myself to check beta, but I don't see why it wouldn't work. Does it work on Nightly for you?
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 5•5 years ago
|
||
Ah, I think I know what's going on. I can't reproduce if I enable fission (site isolation), but I can reproduce if I disable it, for some reason.
| Assignee | ||
Comment 6•5 years ago
|
||
Bisection points to bug 1679456 which is a bit surprising, even if not totally unexpected.
Updated•5 years ago
|
| Assignee | ||
Comment 7•5 years ago
|
||
Just like how for window.open() it's checked on the opener, of course.
Note that when sending the focus request via IPC, we trust the check
done on the child (bug 1677899).
Do we have a good test to extend to cover this case?
| Assignee | ||
Comment 8•5 years ago
|
||
Right, so bug 1679456 made us use the user-interaction state, which is window-local, and we were doing the check on the wrong window, effectively.
| Assignee | ||
Comment 9•5 years ago
|
||
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/db92ea730300
https://hg.mozilla.org/mozilla-central/rev/cc986541595b
| Reporter | ||
Comment 12•5 years ago
|
||
Yep, fixed in firefox-89.0a1.en-US.linux-x86_64.tar.bz2.
Thank you very much!
Updated•5 years ago
|
Updated•5 years ago
|
Comment 13•5 years ago
|
||
== Change summary for alert #29623 (as of Thu, 08 Apr 2021 18:01:55 GMT) ==
Improvements:
| Ratio | Suite | Test | Platform | Options | Absolute values (old vs new) |
|---|---|---|---|---|---|
| 8% | Images | macosx1015-64-shippable-qr | 6,547,448.13 -> 6,055,230.04 | ||
| 6% | Images | windows10-64-shippable | tp6 | 9,478,328.99 -> 8,872,563.88 |
For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=29623
Updated•5 years ago
|
| Assignee | ||
Comment 14•5 years ago
|
||
I think that might be misattributed, I don't know how this patch could speed up the images perf test.
Updated•5 years ago
|
Updated•5 years ago
|
Description
•