Closed Bug 1823300 Opened 1 year ago Closed 1 year ago

Extensions' browser actions get stuck in the toolbar and can't be removed

Categories

(WebExtensions :: General, defect)

Desktop
Windows 10
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: aminomancer, Unassigned)

References

(Blocks 1 open bug)

Details

STR

  1. Make a new profile
  2. Go to about:addons
  3. Install an add-on that has a browser action. Recommended extensions probably includes something like Privacy Badger, this is the example I tested
  4. The browser action is added to the toolbar
  5. Right click the browser action. "Remove from Toolbar" is not present
  6. Click "Customize Toolbar"
  7. Try dragging the browser action out of the toolbar — you can't

Expected

Shouldn't the browser action not be added to the toolbar at all? I thought the unified extensions panel was the default, and adding browser actions to the toolbar was just something the user could choose to do. But not being able to remove it from the toolbar seems like a bug. Could there be a problem with the overflow menu -> unified extensions migration?

Actual

The browser action is stuck on the toolbar, until the extension is uninstalled. And even then, I think its placement is still saved in the customization state for the next time the extension is reinstalled.

Privacy Badger specifies a default_area in the browser_action manifest key (see: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_action), that is probably why it is added to the navbar directly. This is expected behavior.

Now I am not sure why unchecking "Pin to Toolbar" wouldn't work here. At step (5), is there really no "Pin to Toolbar" menu item? (I just tried the STR in Nightly and I could move Privacy Badger back to the extensions panel)

About (6) and (7), that is expected: the customization mode no longer manages extension widgets.

Flags: needinfo?(shughes)

(In reply to William Durand [:willdurand] from comment #1)

Privacy Badger specifies a default_area in the browser_action manifest key (see: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_action), that is probably why it is added to the navbar directly. This is expected behavior.

Now I am not sure why unchecking "Pin to Toolbar" wouldn't work here. At step (5), is there really no "Pin to Toolbar" menu item? (I just tried the STR in Nightly and I could move Privacy Badger back to the extensions panel)

About (6) and (7), that is expected: the customization mode no longer manages extension widgets.

Thanks for testing! So I initially noticed this on my normal Nightly profile (I've been using that profile for a few years), after which I went and checked in a local build of the latest m-c to make sure it's not something on my end. And since I was not aware the menu item is "Pin to Toolbar" now (as opposed to "Remove from Toolbar") I think I may have just overlooked it in my local build, since for non-extension browser actions, the old "Remove from Toolbar" menu item still shows (the non-checkbox one). I can't say with 100% certainty now because I pulled some changes and rebuilt a few times since then. But right now I do see the Pin to Toolbar item, so in any case it does seem to be working as expected on a brand new profile.

I actually still don't see the menu item for some extension browser actions on my own Nightly profile. It doesn't affect the browser actions I already had installed and that I added to the toolbar before the unified extensions panel changes (that's why I suspected it might have something to do with the migration I saw in the source code a few months ago). But now that I can see it's clearly working with a new profile, it seems more likely that maybe my customization state is just messed up somehow, so tomorrow I'll back it up and try resetting it. Feel free to close this, and I'll let you know if resetting the customization state resolves my issue :)

Status: NEW → UNCONFIRMED
Ever confirmed: false
Flags: needinfo?(shughes)
Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.