Merge pull request #1018 from rachel-fenichel/bugfix/block_context_menu

Block browser context menu in the toolbox and flyout
This commit is contained in:
Rachel Fenichel
2017-04-05 10:42:27 -07:00
committed by GitHub

View File

@@ -280,7 +280,7 @@ Blockly.init_ = function(mainWorkspace) {
var svg = mainWorkspace.getParentSvg();
// Suppress the browser's context menu.
Blockly.bindEventWithChecks_(svg, 'contextmenu', null,
Blockly.bindEventWithChecks_(svg.parentNode, 'contextmenu', null,
function(e) {
if (!Blockly.utils.isTargetInput(e)) {
e.preventDefault();