Hide flyout after Events are re-enabled when creating a block (#4055)

This commit is contained in:
Monica Kozbial
2020-07-21 12:58:40 -07:00
committed by GitHub
parent 64488c1402
commit e88ec53425

View File

@@ -765,12 +765,13 @@ Blockly.Flyout.prototype.createBlock = function(originalBlock) {
this.targetWorkspace.setResizesEnabled(false);
try {
newBlock = this.placeNewBlock_(originalBlock);
// Close the flyout.
Blockly.hideChaff();
} finally {
Blockly.Events.enable();
}
// Close the flyout.
Blockly.hideChaff();
var newVariables = Blockly.Variables.getAddedVariables(this.targetWorkspace,
variablesBeforeCreation);