From 627647c7f2cc19ec89479ff8cd788ec56e73ecdd Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Mon, 28 Jun 2021 11:08:03 -0700 Subject: [PATCH] Reflow workspace- and toolbox-owned flyouts when workspace zoom changes. --- core/workspace_svg.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/workspace_svg.js b/core/workspace_svg.js index 95618dbef..8f9590d1e 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -2225,9 +2225,10 @@ Blockly.WorkspaceSvg.prototype.setScale = function(newScale) { this.scale = newScale; Blockly.hideChaff(false); - if (this.flyout_) { - // No toolbox, resize flyout. - this.flyout_.reflow(); + // Get the flyout, if any, whether our own or owned by the toolbox. + var flyout = this.getFlyout(false); + if (flyout && flyout.isVisible()) { + flyout.reflow(); this.recordDragTargets(); } if (this.grid_) {