Closed Bug 1325757 Opened 3 years ago Closed 3 years ago

Ability to set label on contextMenu submenu

Categories

(WebExtensions :: Untriaged, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: bugzilla, Unassigned, NeedInfo)

Details

The contextMenu API doc[1] states:

> If you have created more than one context menu item,
> then the items will be placed in a submenu. The 
> submenu's parent will be labeled with the name of 
> the add-on.

I feel this is quite limiting. My current Context Search add-on creates a submenu of options with which to search for the currently selected string. To provide a nicer UX, it mimics the behaviour of the "Search Google for 'x'" item on the context menu, like so:

http://www.basson.at/images/addons/contextsearch.png

Without the ability to set the submenu label, I would not be able to implement that part of the add-on when converting from XUL to WebExtensions.

[1]: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/contextMenus
Just to add to the above, for this to be useful to me, it would have to have some hook that I could use to dynamically set the label as the context menu opens.
Would presumably depend on bug 1215376.
for now if you want to create top level menu - can create one top level and submenu for that should work.
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
(In reply to :shell escalante from comment #3)
> for now if you want to create top level menu - can create one top level and
> submenu for that should work.

I don't understand this comment. Are you saying that if I create a menu at the top level, I can set the label on that menu to be whatever I want?
Hi, I still don't understand your comment. Can you please explain why this is WONTFIX and how I can achieve my goal otherwise? Thanks.
(In reply to Ben Basson from comment #1)
> Just to add to the above, for this to be useful to me, it would have to have
> some hook that I could use to dynamically set the label as the context menu
> opens.

(In reply to :shell escalante from comment #3)
> for now if you want to create top level menu - can create one top level and
> submenu for that should work.

(In reply to Ben Basson from comment #5)
> Hi, I still don't understand your comment. Can you please explain why this
> is WONTFIX and how I can achieve my goal otherwise? Thanks.

(In reply to Alice0775 White from comment #6)
> https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/contextMenus/
> update ?

Did you ever get this working? If not, is there more info needed from "shell escalante"?
Flags: needinfo?(bugzilla)
I think I wrongly added: "Flags: needinfo?(bugzilla@basson.at)" when it should have been "Alice0775 White".
Flags: needinfo?(alice0775)
Flags: needinfo?(bugzilla)
Sorry, I have a no idea.
Flags: needinfo?(alice0775)
Product: Toolkit → WebExtensions

(In reply to :shell escalante from comment #3)

for now if you want to create top level menu - can create one top level and
submenu for that should work.

(In reply to Ben Basson from comment #5)

Hi, I still don't understand your comment. Can you please explain why this
is WONTFIX and how I can achieve my goal otherwise? Thanks.

I think this was never answered.

Flags: needinfo?(sescalante)
You need to log in before you can comment on or make changes to this bug.