Pass modifier (shift,cmd,...) to onclick callback for chrome.contextMenus.create()
Reported by
kewi...@gmail.com,
Sep 14 2016
|
||
Issue description
This is a feature request to add a property to the info object of the onclick callback for chrome.contextMenus.create() and friends.
A common use case for context menu items is opening tabs based on the clicked item. Also, it is common that Cmd+Click on a link opens a link in a new tab.
It would be great if the modifier(s) used were exposed on to the callback that gets called when the context menu item is clicked. This way I can have a normal click open the link in the current tab, and a Cmd+Click open it in a new tab.
Suggested addition to onclick callback object info:
{
...
"modifiers": ["Shift", "Ctrl", "MacCtrl"]
...
}
The modifiers should use the same format as in chrome.commands.
The only way to work around currently is to use separate context menu items for opening and opening in a new tab. This quickly gets cluttered when there are 4+ items in the context menu and having to add an "open in new tab" option for each of these, even with menu separators.
,
Sep 10 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by pelets...@chromium.org
, Sep 22 2016