Implement missing features for contextMenus

RESOLVED INVALID

Status

()

Toolkit
WebExtensions: Untriaged
RESOLVED INVALID
3 years ago
3 years ago

People

(Reporter: Gabor Krizsanits (INACTIVE), Unassigned, Mentored)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [contextMenus])

(Reporter)

Description

3 years ago
Some features are still missing:

- onBeforeShow (see Bug 1190667 Comment 2)
- radio buttons / checkboxes
- event page version
- icon
(Reporter)

Updated

3 years ago
Blocks: 1161828
Depends on: 1190667

Updated

3 years ago
Whiteboard: [contextMenus]

Comment 1

3 years ago
Not chrome conform, but maybe possibilities to hide context menu items and create own submenus would be nice. Also we should have a possibility to decide if we want to have "one menu" with more as one item or not.
 
Also it is currently not possible to decide according web content for e.g. a DIV with a special classname, if an item should be displayed or not (if it is not a url or a image or whatever for a standard HTML element) -> custom elements with check for properties are needed.

At the moment i use the "mousedown" event for a a precheck of the target element, send a message to backgound and create the context menu at this time. It is also not able to use the "contextmenu" event, because it is all async and the new context menu item is not fast enough created so the item would only be visible at 2nd click. This was no problem on my bootstrap addon with a framescipt. So the performance of Webextensions seems to be worse as the old style fx addons.

Last but not least the in opposite to my old style bootstrap addon with framescript the eventlistener fires not on iframes because it is settled to the main document in WE and not to the ContentFrameMessageManager. With bootstrap  addons with framesscripts it was fired on main documents and iframes.

Comment 2

3 years ago
I already mentioned the async race condition in Google Chrome and it is linked in Comment 1.

I consider this feature broken without proper onBeforeShow support for content->chrome communication.
Splitting this into three separate bugs, per discussion in triage. Please continue these discussions in the appropriate new bugs.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Depends on: 1215377, 1215376, 1215375
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.