Bookmarklet using window.open triggers popup blocker
Categories
(Firefox :: Untriaged, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox85 | --- | wontfix |
firefox86 | --- | verified |
firefox87 | --- | verified |
People
(Reporter: jscher2000, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details | Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0
Steps to reproduce:
Run a bookmarklet that uses window.open(). For example:
javascript:void(window.open(location.href, "_blank"));
Actual results:
Popup blocker prevents the new window from opening, and Firefox presents the yellow bar.
Web Console reports: "Opening multiple popups was blocked due to lack of user activation."
Expected results:
This is a change from Firefox 84; the desired behavior is to recognize user approval via running the bookmarklet.
Mozregression points to "Bug 1679456 - Consume user activation on popup opening and remove popup opening tokens."
Users have reported the issue on SUMO and Reddit:
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
I'll simplify all the popup-blocking setup in a follow-up, but this is
the low-risk change.
Need to add a test for this of course. Kinda baffled we did not have
any.
Assignee | ||
Comment 2•4 years ago
|
||
This will make easier to add more tests in the future.
Assignee | ||
Comment 5•4 years ago
|
||
Comment on attachment 9200256 [details]
Bug 1689853 - Fake a user interaction when handling LOAD_FLAGS_ALLOW_POPUPS. r=edgar,smaug
Beta/Release Uplift Approval Request
- User impact if declined: comment 0
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: comment 0
- List of other uplifts needed: none
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Special-case loads triggered by the browser UI which already had a flag to also fake a user interaction, in order to make popups work.
- String changes made/needed: none
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
Comment on attachment 9200258 [details]
Bug 1689853 - Cleanup browser_multiple_popups.js. r=edgar,smaug
The test-only cleanup shouldn't need to be in beta, probably...
Comment 7•4 years ago
|
||
Set release status flags based on info from the regressing bug 1679456
Comment 8•4 years ago
|
||
Backed out 2 changesets (bug 1689853) for Browser-chrome crash in [@ mozilla::(anonymous namespace)::RunWatchdog(void*)]. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer?job_id=328440412&repo=autoland&lineNumber=2767
https://treeherder.mozilla.org/logviewer?job_id=328442655&repo=autoland&lineNumber=15925
Push with failures:
https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&revision=16c796643d527e3003bd552586fc2c187c652eb1
Backout:
https://hg.mozilla.org/integration/autoland/rev/8e8261bb094f44136f53df00f35dddb770b42f03
Assignee | ||
Comment 9•4 years ago
|
||
It seems we're timing out at the end of the test run. Not sure why my test would cause that off-hand.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 10•4 years ago
|
||
Waiting for the load event on the popup window fixed it.
Comment 11•4 years ago
|
||
Comment 12•4 years ago
|
||
Reporter | ||
Comment 13•4 years ago
|
||
While we're at it...
Could we test whether this resolves an issue in the WordPress editor's Preview function (SUMO). It seems to be that window.focus() doesn't work after window.open() with a named window if the window was already open. Test page:
https://www.jeffersonscher.com/res/focusnamedtab.html
- first click, opens second tab and Firefox focuses it
- return to the first tab, click again, the second tabs reloads, but is not focused
Mozregression points to the same: Bug 1679456 - Consume user activation on popup opening and remove popup opening tokens.
Assignee | ||
Comment 14•4 years ago
|
||
Can you file a new bug for that and ni? me? This won't address it.
Comment 15•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1b3b3291fe1b
https://hg.mozilla.org/mozilla-central/rev/1f1cf37833df
Updated•4 years ago
|
Comment 16•4 years ago
|
||
Comment on attachment 9200256 [details]
Bug 1689853 - Fake a user interaction when handling LOAD_FLAGS_ALLOW_POPUPS. r=edgar,smaug
Approved for 86 beta 5, thanks.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 17•4 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/fb4d1a0ef359
https://hg.mozilla.org/releases/mozilla-beta/rev/4886b1657d08
Updated•4 years ago
|
Comment 18•4 years ago
|
||
Reproduced with Fx 87.0a1 (2021-01-30) on Windows 10.
Verified fixed with Fx 87.0a1 (2021-02-02) and Fx 86.0b5 (treeherder build) on Windows 10, macOS 10.15 and Ubuntu 18.04.
Comment 19•4 years ago
|
||
So, this should be resolved with the next release?
Assignee | ||
Comment 20•4 years ago
|
||
Yes.
Comment 21•4 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #20)
Yes.
On a more organizational than programming note, this appears to pop up on a semi-regular basis. (Every few years)
Is there something missing in the review of new releases that needs to be added?
Assignee | ||
Comment 22•4 years ago
|
||
Well, we apparently didn't have an automated test for this, so I added one. It should hopefully prevent this from happening again.
Comment 23•4 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #22)
Well, we apparently didn't have an automated test for this, so I added one. It should hopefully prevent this from happening again.
Thanks.
I'm actually so old school that I was thinking of an aviation style paper checklist.
Description
•