mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
Only add a block in the flyout if it is not disabled (#1204)
* Only add a block in the flyout if it is not disabled * PR feedback * remove previous fix
This commit is contained in:
committed by
Rachel Fenichel
parent
de67108b17
commit
21b05d2a69
@@ -605,11 +605,13 @@ Blockly.Gesture.prototype.doFieldClick_ = function() {
|
||||
Blockly.Gesture.prototype.doBlockClick_ = function() {
|
||||
// Block click in an autoclosing flyout.
|
||||
if (this.flyout_ && this.flyout_.autoClose) {
|
||||
if (!Blockly.Events.getGroup()) {
|
||||
Blockly.Events.setGroup(true);
|
||||
if (!this.targetBlock_.disabled) {
|
||||
if (!Blockly.Events.getGroup()) {
|
||||
Blockly.Events.setGroup(true);
|
||||
}
|
||||
var newBlock = this.flyout_.createBlock(this.targetBlock_);
|
||||
newBlock.scheduleSnapAndBump();
|
||||
}
|
||||
var newBlock = this.flyout_.createBlock(this.targetBlock_);
|
||||
newBlock.scheduleSnapAndBump();
|
||||
} else {
|
||||
// Clicks events are on the start block, even if it was a shadow.
|
||||
Blockly.Events.fire(
|
||||
|
||||
Reference in New Issue
Block a user