[Add-ons] when popup is opened on install, the incognito permission prompt blocks it
Categories
(WebExtensions :: General, defect)
Tracking
(Not tracked)
People
(Reporter: oaeben, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0
Steps to reproduce:
Have the following code in background-script.js :
browser.runtime.onInstalled.addListener(({ reason }) => {
if (reason === 'install') {
browserbrowserAction.openPopup();
}
});
Actual results:
The popup is opened on install, but the incognito permission prompt is displayed on top of it.
Accepting/Dismissing the incognito prompt also closes the popup beneath it
Expected results:
Either browser.runtime.onInstalled should happen after that prompt, or provide some other way to deal with the situation.
I'd like to also note that the reason that I would like my popup to open on install, is because in Manifest V3 there isn't automatic permission prompt anymore (permissions are optional)
So the only way to make sure that users accept the permissions required for my extension to work, is to prompt for permissions on install myself.
I've also tried another way, opening a new tab with the popup.html instead of the popup itself.
browserApi.runtime.onInstalled.addListener(({ reason }) => {
if (reason === 'install') {
browserApi.tabs.create({ url: browserApi.runtime.getURL('popup/popup.html') });
}
});
It seems to behave similarly, the tab is opened, and the incognito permission prompt is displayed at the top right of the screen.
Clicking the incognito prompt closes the tab immediately.
Comment 2•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 3•2 years ago
|
||
I'm pretty sure this happens because selecting "Allow this extension to run in Private Windows" restarts the extension.
Comment 5•2 years ago
|
||
Thanks Alexi!
| Comment hidden (advocacy) |
Description
•