Popup blocker blocks wrong site when using a toolbar button script
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: rob215x, Unassigned)
References
(Regression)
Details
(Keywords: regression)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0
Steps to reproduce:
I've been using a toolbar button for years to save sites in my bookmarking site. The toolbar button has some javascript that opens a popup window with the following URL like this:
https://linkatopia.com/add_external?uri=https%3A%2F%2Fdevelopers.whatismybrowser.com%2Fuseragents%2Fexplore%2Flayout_engine_name%2Ftrident%2F;title=Trident User Agents - WhatIsMyBrowser.com
Actual results:
When I click my toolbar button to save a new link, I get the yellow bar with "Firefox prevented this site from opening a pop-up window."
In this particular case, I can click "Options" in the yellow bar and get Firefox to allow popups from developers.whatismybrowser.com and then the popup works.
But this is a problem because I get the yellow bar every time I go to save a new site. Each time, it asks if I want to allow popups from the new site. I actually do not want to allow popups from these sites.
Expected results:
Firefox should ask if I want to allow popups from linkatopia.com since that is the URL of the popup. Then I can just add linkatopia.com to my allowed list. Or, it should know that I'm clicking a toolbar button that has nothing to do with the site in the current tab.
I'm using the current tab's DOM to get location.href and document.title but this used to work fine in Firefox 84 (not sure what sub version because I upgraded Firefox in both of my Linux PCs and my Windows VMs. It works in my old Macbook but that's running 78.7.1esr).
Thanks for a wonderful browser by the way. It is my default on all platforms.
Comment 1•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Address Bar' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Reporter | ||
Updated•4 years ago
|
Comment 2•4 years ago
|
||
Hi Robert,
If you have the time, could you please try to find the regression range for this issue? Especially since you mentioned that it used to work in Firefox 84.
Mozzregression tool: https://mozilla.github.io/mozregression/install.html
You can set up the first good build as Release 84 and the first bad build the latest Release 85 and see what you got.
Reporter | ||
Comment 3•4 years ago
|
||
Hi,
I followed the link provided but I might have needed some dependencies or something so I got it to work by installing mozregression from AUR (I'm running Manjaro XFCE)
I set up the builds as 84 and 85 as asked. That's running now... Let's see...
Tested mozilla-central build: 2020-11-30 - my "bookmarklet" in the toolbar works as intended.
Tested mozilla-central build: 2020-12-07 - doesn't work
Tested mozilla-central build: 2020-12-04 - doesn't work
Tested mozilla-central build: 2020-12-02 - doesn't work
Tested mozilla-central build: 2020-12-01 - doesn't work
Okay, I just discovered something and it applies to even the latest version of my regular Firefox (85.0.2)
- if I click on the page FIRST, then click my bookmarklet, IT WORKS!!
- if I click on another part of the interface (the url bar, a blank spot in the bookmarks bar, a blank spot between the home button and the url bar, anywhere other than the page itself) I get the POPUP warning!!
Now I have to start over with the regression tests. I'll do that in the next comment.
Reporter | ||
Comment 4•4 years ago
|
||
Here is my test:
- right-click blank space between home and url bar > Bookmarks Toolbar > Always
- visit https://linkatopia.com/help/buttons (I built this site in 2006. Some info on the page is really outdated. I'm currently rebuilding the site. you don't need a login for this test)
- drag the "Linkatopia Popup" button the the bookmarks toolbar
- click the Firefox home button
- click the Linkatopia bookmarklet, a popup should appear that says "Oops there was an error!" (because you aren't logged in)
- close the popup
- click somewhere on the page
- click the Linkatopia bookmarklet, popup appears
- close the popup
- click the blank area between the home button and the url bar
- click the Linkatopia bookmarklet, popup appears
- close the popup
Now back to the regression...
Tested mozilla-central build: 2020-11-30 - my "bookmarklet" in the toolbar works as intended.
Tested mozilla-central build: 2020-12-07 - doesn't work, yellow popup blocker notice at step 5 and 11, but not 8 (popup appears normally)
Tested mozilla-central build: 2020-12-04 - doesn't work, yellow popup blocker notice at step 5 and 11, but not 8 (popup appears normally)
Tested mozilla-central build: 2020-12-02 - doesn't work, yellow popup blocker notice at step 5 and 11, but not 8 (popup appears normally)
Tested mozilla-central build: 2020-12-01 - doesn't work, yellow popup blocker notice at step 5 and 11, but not 8 (popup appears normally)
Tested mozilla-central build: abafe6c9 - doesn't work, yellow popup blocker notice at step 5 and 11, but not 8 (popup appears normally)
Tested mozilla-central build: 99aa3dc8 - doesn't work, yellow popup blocker notice at step 5 and 11, but not 8 (popup appears normally)
Tested autoland build: 8b56e2cc - my "bookmarklet" in the toolbar works as intended.
Tested autoland build: 58242463 - doesn't work, yellow popup blocker notice at step 5 and 11, but not 8 (popup appears normally)
Tested autoland build: 68af110c - doesn't work, yellow popup blocker notice at step 5 and 11, but not 8 (popup appears normally)
Tested autoland build: 416d0739 - my "bookmarklet" in the toolbar works as intended.
and that's it.
The end of the Log says:
Depends on D98021
Differential Revision: https://phabricator.services.mozilla.com/D98022
2021-02-24T03:51:42.906000: DEBUG : Did not find a branch, checking all integration branches
2021-02-24T03:51:42.911000: INFO : The bisection is done.
2021-02-24T03:51:42.912000: INFO : Stopped
The "Build Info" box says:
app_name: firefox
build_date: 2020-11-30 22:11:08.858000
build_file: /home/design215/.mozilla/mozregression/persist/8b56e2cc3518-shippable--autoland--target.tar.bz2
build_type: integration
build_url: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/T57oxEm-QLyClEqawkTnSg/runs/0/artifacts/public%2Fbuild%2Ftarget.tar.bz2
changeset: 8b56e2cc35182d27a1bc16a8404463a581128e7f
pushlog_url: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=8b56e2cc35182d27a1bc16a8404463a581128e7f&tochange=99aa3dc8e18594112bbe6581d37ed83623a48efa
repo_name: autoland
repo_url: https://hg.mozilla.org/integration/autoland
task_id: T57oxEm-QLyClEqawkTnSg
Let me know if you need anything else.
Comment 5•4 years ago
|
||
Thank you very much for the very detailed explanation and steps to reproduce! I can also reproduce it myself right now, clicking the Linkatopia Bookmarklet will ask for pop-up permission for the opened site instead of asking for Linkatopia, unless you click somewhere on the site first, as you also mentioned.
I will continue the mozregression process from where you left in hope it can be bisected further and update here when I am done with it.
Comment 6•4 years ago
|
||
Reduced Steps to reproduce:
- Enable Bookmarks Toolbar
- Go to https://linkatopia.com/help/buttons and drag&drop the "Linkatopia Popup" button to the bookmarks toolbar
- Go to a different site, ex: reddit.com
- Don't click on the page
- Click on the bookmarklet you just added
Expected Results:
Firefox should ask to allow popups for the bookmarklets instead of the site we just visited.
Note: Unnafected build where those were clicking on the bookmarklet will not toggle the popup warning infobar<- This might also be the correct expected result, Chrome has also this behavior.
Actual Results:
The popup warning infobar offers to allow popups for the active site instead of the bookmarklet. Due to this every time the user wants to use the bookmarklet on different sites, the user will need to forcefully allow popups for the opened site.
Bisected further the regression range: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=416d073941f5f9ca6b7b5262b98eb87100f0b8d0&tochange=68af110cd33e39111ef50541073b3c681a59bc2b
Regressed by: Bug 1679456
Hey Emilio, please take a look at this when you have, seems like another bookmarklet issue like Bug 1689853. Reduced steps and results are in this comment.
Comment 7•4 years ago
|
||
Probably a duplicate of bug 1694013?
Updated•4 years ago
|
Reporter | ||
Comment 10•4 years ago
|
||
Hey I just wanted to thank everyone for fixing this bug. I just got Firefox 86.0 for Manjaro Linux and it works perfectly now!!
Updated•4 years ago
|
Description
•