mirror of
https://github.com/google/blockly.git
synced 2026-01-11 10:57:07 +01:00
Also listen to right-button in menus. #456
This commit is contained in:
@@ -66,6 +66,10 @@ Blockly.ContextMenu.show = function(e, options, rtl) {
|
||||
if (option.enabled) {
|
||||
goog.events.listen(menuItem, goog.ui.Component.EventType.ACTION,
|
||||
option.callback);
|
||||
menuItem.handleContextMenu = function(e) {
|
||||
// Right-clicking on menu option should count as a click.
|
||||
goog.events.dispatchEvent(this, goog.ui.Component.EventType.ACTION);
|
||||
};
|
||||
}
|
||||
}
|
||||
goog.events.listen(menu, goog.ui.Component.EventType.ACTION,
|
||||
|
||||
Reference in New Issue
Block a user