mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
Make flyouts read-only if the parent is read-only
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user