diff --git a/core/flyout_base.js b/core/flyout_base.js index e860c9c97..d01652c67 100644 --- a/core/flyout_base.js +++ b/core/flyout_base.js @@ -477,6 +477,8 @@ Blockly.Flyout.prototype.show = function(flyoutDef) { throw TypeError('Result of toolbox category callback must be an array.'); } } + this.setVisible(true); + // Parse the Array or NodeList passed in into an Array of // Blockly.utils.toolbox.Toolbox. var parsedContent = Blockly.utils.toolbox.convertToolboxToJSON(flyoutDef); @@ -484,8 +486,6 @@ Blockly.Flyout.prototype.show = function(flyoutDef) { /** @type {{contents:!Array., gaps:!Array.}} */ ( this.createFlyoutInfo_(parsedContent)); - this.setVisible(true); - this.layout_(flyoutInfo.contents, flyoutInfo.gaps); // IE 11 is an incompetent browser that fails to fire mouseout events.