From 73b06f14bbfd1e3ac11138e4ac6f745ba202dab3 Mon Sep 17 00:00:00 2001 From: Monica Kozbial <6621618+moniika@users.noreply.github.com> Date: Fri, 11 Jun 2021 11:10:22 -0700 Subject: [PATCH] Fix bug in Flyout getClientRect (#4901) --- core/flyout_horizontal.js | 2 +- core/flyout_vertical.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/flyout_horizontal.js b/core/flyout_horizontal.js index 9ef631834..c201ce272 100644 --- a/core/flyout_horizontal.js +++ b/core/flyout_horizontal.js @@ -310,7 +310,7 @@ Blockly.HorizontalFlyout.prototype.isDragTowardWorkspace = function( * target area should be ignored. */ Blockly.HorizontalFlyout.prototype.getClientRect = function() { - if (!this.svgGroup_ || this.autoClose || this.isVisible()) { + if (!this.svgGroup_ || this.autoClose || !this.isVisible()) { // The bounding rectangle won't compute correctly if the flyout is closed // and auto-close flyouts aren't valid drag targets (or delete areas). return null; diff --git a/core/flyout_vertical.js b/core/flyout_vertical.js index ca60d5718..90b0d9765 100644 --- a/core/flyout_vertical.js +++ b/core/flyout_vertical.js @@ -293,7 +293,7 @@ Blockly.VerticalFlyout.prototype.isDragTowardWorkspace = function( * target area should be ignored. */ Blockly.VerticalFlyout.prototype.getClientRect = function() { - if (!this.svgGroup_ || this.autoClose || this.isVisible()) { + if (!this.svgGroup_ || this.autoClose || !this.isVisible()) { // The bounding rectangle won't compute correctly if the flyout is closed // and auto-close flyouts aren't valid drag targets (or delete areas). return null;