From e94747121536879da1194d9d2d779fbc33627c77 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Tue, 19 Mar 2019 15:48:52 -0700 Subject: [PATCH] Fixed updateToolbox not properly updating flyouts. (#2332) --- core/workspace_svg.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/workspace_svg.js b/core/workspace_svg.js index b13bcacc4..f4ed5eb46 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -1574,8 +1574,10 @@ Blockly.WorkspaceSvg.prototype.updateToolbox = function(tree) { throw Error('Existing toolbox has no categories. Can\'t change mode.'); } this.options.languageTree = tree; - this.toolbox_.populate_(tree); + var openNode = this.toolbox_.populate_(tree); this.toolbox_.addColour_(); + this.toolbox_.position(); + this.toolbox_.tree_.setSelectedItem(openNode); } else { if (!this.flyout_) { throw Error('Existing toolbox has categories. Can\'t change mode.');