From 077547ec90f7907eb5ce7723529ce5aba845bb2c Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Tue, 4 Apr 2017 14:36:01 -0700 Subject: [PATCH] Block browser context menu in the toolbox and flyout --- core/inject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/inject.js b/core/inject.js index 54509db71..f685a715c 100644 --- a/core/inject.js +++ b/core/inject.js @@ -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();