Open Bug 1418394 Opened 2 years ago Updated 8 months ago
Popup window created by extension cannot close itself on Windows 10
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36 Steps to reproduce: 1. Extract the attached archive, load as temporary extension. 2. The extension will open a popup window, wait for it to finish loading. 3. Click the "Close the window" button in the popup window. Actual results: The window does not close, the following exception is displayed in the console for the window: Scripts may not close windows that were not opened by script. popup.js:4:2 Expected results: The window should close. Notes: The problem happens for me with Firefox 57 on Windows 10 but not on Linux (Debian Buster). See the related Adblock Plus issue https://issues.adblockplus.org/ticket/6053
Component: Untriaged → WebExtensions: Frontend
Product: Firefox → Toolkit
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1301227
Reopening: Dave tested it with the allowScriptsToClose flag and the issue is still reproducible.
Yea, passing the allowScriptsToClose flag as true seemed to have no effect. On Linux the window closed still, on Windows 10 it didn't. So I guess the bug here is actually that allowScriptsToClose is not honoured on either platform, we shouldn't be able to close the window on Linux if the option is missing, and we should be able to close it on Windows 10 if the options is passed.
I can also reproduce the bug on Linux by setting extensions.webextensions.remote to true and restarting Firefox.
You need to log in before you can comment on or make changes to this bug.