Closed Bug 1353781 Opened 4 years ago Closed 4 years ago

Container context menu "all" issues

Categories

(WebExtensions :: General, enhancement, P5)

55 Branch
x86_64
Linux
enhancement

Tracking

(firefox55 affected)

RESOLVED INVALID
Tracking Status
firefox55 --- affected

People

(Reporter: jkt, Unassigned)

References

Details

(Whiteboard: triaged)

In the test pilot experiment for containers 

- context: ["all"] doesn't seem to apply to "tab" contextMenu items available in 53
- Context menus for browser actions don't apply the extension icon


The code we are using is:

        browser.contextMenus.create({
          id: menuId,
          title: `${prefix} Always Open in This Container`,
          checked: true,
          contexts: ["all"],
        });
zombie, do you know the answer?
Flags: needinfo?(tomica)
Priority: -- → P5
Whiteboard: triaged
(In reply to Jonathan Kingston [:jkt] from comment #0)
> - context: ["all"] doesn't seem to apply to "tab" contextMenu items
> available in 53

Yes, this is on purpose, we decided to to keep new, not in-content contexts out of "all", similar to "launcher" context from Chrome [1].  I'll update the docs on MDN to reflect that, it seems I missed it the last time.

1) https://developer.chrome.com/extensions/contextMenus#type-ContextType


> - Context menus for browser actions don't apply the extension icon

That is as intended.  The "browser_action" context is different from others, where menu items added by your extension are mixed in with items from other extensions, and the icon is used to show origin of each one.  Furthermore, even in those contexts, your icon is only visible on *one* of your menu items: 1) either if it is the only item from your extension, or 2) if you added more than one, they are grouped into a single submenu item with an icon.

None of that logic applies for the browserAction context menu.  You can only add menu items to your own browserAction context menu (so no need to identify origin), and you are not limited to just one (and adding the same icon to multiple would be redundant and ugly).
Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(tomica)
Resolution: --- → INVALID
Thanks for closing the loop on this. MDN docs were certainly what threw me off here. Thanks.
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.