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•2 years 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•2 years ago
|
| Assignee | ||
Comment 2•2 years 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•2 years 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•2 years 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•2 years ago
|
||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 6•2 years 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•2 years ago
|
||
… close it using the sidebarAction API.
That won't work because it requires a user trusted event :(
Updated•2 years ago
|
Comment 9•2 years ago
|
||
| bugherder | ||
Description
•