mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
Stop context menu in context menu. Issue #372.
This commit is contained in:
@@ -77,6 +77,8 @@ Blockly.ContextMenu.show = function(e, options, rtl) {
|
||||
menu.render(div);
|
||||
var menuDom = menu.getElement();
|
||||
Blockly.addClass_(menuDom, 'blocklyContextMenu');
|
||||
// Prevent system context menu when right-clicking a Blockly context menu.
|
||||
Blockly.bindEvent_(menuDom, 'contextmenu', null, Blockly.noEvent);
|
||||
// Record menuSize after adding menu.
|
||||
var menuSize = goog.style.getSize(menuDom);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user