From a64cc214ba8e0070f9ada6afaece39fc3dda4a74 Mon Sep 17 00:00:00 2001 From: "Evan W. Patton" Date: Fri, 24 Mar 2017 09:12:33 -0400 Subject: [PATCH] Make flyouts read-only if the parent is read-only --- core/flyout.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/flyout.js b/core/flyout.js index 43427b01b..3df8eff0e 100644 --- a/core/flyout.js +++ b/core/flyout.js @@ -970,6 +970,11 @@ Blockly.Flyout.blockRightClick_ = function(e, block) { Blockly.Flyout.prototype.blockMouseDown_ = function(block) { var flyout = this; return function(e) { + if (block.workspace.targetWorkspace.options.readOnly) { + e.stopPropagation(); + e.preventDefault(); + return; + } if (Blockly.utils.isRightButton(e)) { Blockly.Flyout.blockRightClick_(e, block); } else {