Addon update or reload opens the addon sidebar, even if open_at_install=false and if sidebar was closed
Categories
(WebExtensions :: Frontend, defect, P3)
Tracking
(firefox129 fixed)
Tracking | Status | |
---|---|---|
firefox129 | --- | fixed |
People
(Reporter: me+bz, Assigned: zombie)
References
Details
(Whiteboard: [addons-jira])
Attachments
(2 files)
Steps to reproduce:
Our addon (Video DownloadHelper) has sidebar_action
defined and open_at_install
is set to false.
When the addon is reloaded (via browser.runtime.reload
) or updated, the sidebar opens, even if the sidebar was originally closed, and without any user interactions.
Basically, from the point of view of our users, Firefox opens a sidebar out of nowhere. And they complain about our addon forcing the sidebar on them.
I have attached an addon to illustrate the issue.
Comment 1•5 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Reporter | ||
Updated•5 months ago
|
Assignee | ||
Comment 2•5 months ago
|
||
Note for reproducing the bug, you need to first manually show the extension's sidebar, then close it, and then reload the extension.
It looks like this condition needs an additional check to see if the sidebar is currently visible:
https://searchfox.org/mozilla-central/source/browser/components/extensions/parent/ext-sidebarAction.js#141,143
Setting to P3, patches welcome.
Assignee | ||
Comment 3•5 months ago
|
||
Oh and forgot, as a workaround, extensions should be able to both detect the sidebar was opened, and close it using the sidebarAction API.
Reporter | ||
Comment 4•5 months ago
|
||
as a workaround, extensions should be able to both detect the sidebar was opened, and close it using the sidebarAction API.
How would that work? Detecting the sidebar was open is easy enough, but how would we know it was open by the user or by Firefox?
Assignee | ||
Comment 5•5 months ago
|
||
Updated•5 months ago
|
Assignee | ||
Updated•5 months ago
|
Updated•5 months ago
|
Assignee | ||
Comment 6•5 months ago
|
||
How would that work? Detecting the sidebar was open is easy enough, but how would we know it was open by the user or by Firefox?
I was thinking something like knowing you're being updated from the reason
argument for onInstalled
, and sidebars being opened within <1s from that event.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onInstalled#addlistener_syntax
Reporter | ||
Comment 7•5 months ago
|
||
… close it using the sidebarAction API.
That won't work because it requires a user trusted event :(
Updated•3 months ago
|
Pushed by tjovanovic@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c5a4968285a1 Don't open a sidebar for open_at_install=false after extension reloads r=rpl
Comment 9•3 months ago
|
||
bugherder |
Description
•