Can't execute script having activeTab permission after page reload
Categories
(WebExtensions :: Untriaged, enhancement, P3)
Tracking
(firefox108 affected, firefox109 affected, firefox110 affected)
People
(Reporter: maximtop, Unassigned)
References
Details
(Whiteboard: [addons-jira])
Attachments
(2 files)
Steps to reproduce:
- install the extension from the attached files
- go to example.org
- open browser action
- click "reload"
- click "execute script"
Actual results:
page reloaded, but the script didn't execute, in the console wasn't printed 'hello from content script'
Expected results:
page reloaded and the script executed (printed in console 'hello from content script')
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'WebExtensions::Untriaged' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
Hello,
I reproduced the issue on the latest Nightly (110.0a1/20221215195521), Beta (109.0b3/20221215185833) and Release (108.0/20221208122842) under Windows 10 x64 and Ubuntu 16.04 LTS.
Following the STR and clicking “execute script” will not print “hello from content script” in the console. Page reload works.
See the attached screenshot for more details.
Comment 3•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•2 years ago
|
||
FYI: Chrome has the expected behavior. The activeTab permission sticks around as long as the tab is same-origin compared to the initial state of the tab. E.g. after reloading or navigation to different path at same origin, activeTab sticks around, judging by successful execution of tabs.executeScript
.
Comment 5•18 days ago
|
||
This was recently mentioned in an inconsistency issue on the WebExtensions Community Group: https://github.com/w3c/webextensions/issues/657.
In Chrome: If you click an extension icon on a tab on which you have not granted host permissions, it requires that you refresh the page before it will load the extension. You can reload the page as many times as you want without permanent host permissions and it will load the extension each time, until you close the tab.
In Firefox: If you click the extension icon on a tab on which you have not granted host permissions it automatically loads the extension. If you refresh the page, it requires another click.
This was also previously reported in bug 1535803, which was closed as "expected behavior."
Description
•