Container context menu "all" issues

RESOLVED INVALID

Status

enhancement
P5
normal
RESOLVED INVALID
2 years ago
Last year

People

(Reporter: jkt, Unassigned)

Tracking

55 Branch
x86_64
Linux
Dependency tree / graph

Firefox Tracking Flags

(firefox55 affected)

Details

(Whiteboard: triaged)

Reporter

Description

2 years ago
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"],
        });

Comment 1

2 years ago
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: 2 years ago
Flags: needinfo?(tomica)
Resolution: --- → INVALID
Reporter

Comment 3

2 years ago
Thanks for closing the loop on this. MDN docs were certainly what threw me off here. Thanks.

Updated

Last year
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.