From e88ec53425da4704b5dd150e5bc3e5e409a5eb93 Mon Sep 17 00:00:00 2001 From: Monica Kozbial Date: Tue, 21 Jul 2020 12:58:40 -0700 Subject: [PATCH] Hide flyout after Events are re-enabled when creating a block (#4055) --- core/flyout_base.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/flyout_base.js b/core/flyout_base.js index 2d382a2be..c51777d57 100644 --- a/core/flyout_base.js +++ b/core/flyout_base.js @@ -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);