Skip to content

Commit

Permalink
Fix bug in Flyout getClientRect (#4901)
Browse files Browse the repository at this point in the history
  • Loading branch information
moniika authored Jun 11, 2021
1 parent 566b14e commit 73b06f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/flyout_horizontal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion core/flyout_vertical.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 73b06f1

Please sign in to comment.