From 6d47853370f5f656f9b34a01277e88dae187b972 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Tue, 11 Jun 2019 07:03:03 -0700 Subject: [PATCH] Fixed workspace scroll not properly hiding floating elements. --- core/workspace_svg.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/workspace_svg.js b/core/workspace_svg.js index 7cedea7ee..52f7dae05 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -1913,6 +1913,8 @@ Blockly.WorkspaceSvg.prototype.setScale = function(newScale) { * @package */ Blockly.WorkspaceSvg.prototype.scroll = function(x, y) { + Blockly.hideChaff(/* opt_allowToolbox */ true); + // Keep scrolling within the bounds of the content. var metrics = this.getMetrics(); // This is the offset of the top-left corner of the view from the @@ -1945,10 +1947,6 @@ Blockly.WorkspaceSvg.prototype.scroll = function(x, y) { this.scrollbar.vScroll.setHandlePosition(-(y + metrics.contentTop) * this.scrollbar.vScroll.ratio_); } - - // Hide the WidgetDiv without animation. This is to prevent a disposal - // animation from happening in the wrong location. - Blockly.WidgetDiv.hide(true); // We have to shift the translation so that when the canvas is at 0, 0 the // workspace origin is not underneath the toolbox. x += metrics.absoluteLeft;