From 8415db40857c5e8ac421e5ac04dbac9558710a08 Mon Sep 17 00:00:00 2001 From: Rodrigo Queiro Date: Mon, 9 May 2016 09:02:25 -0700 Subject: [PATCH] Hide dropdowns when scrolling the flyout Fixes #302. This hides both WidgetDiv and DropDownDiv without animation, otherwise they can float over other blocks as they're animating out. --- core/flyout.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/flyout.js b/core/flyout.js index 8b805658..be732c7c 100644 --- a/core/flyout.js +++ b/core/flyout.js @@ -741,6 +741,8 @@ Blockly.Flyout.prototype.blockMouseDown_ = function(block) { return function(e) { flyout.dragMode_ = Blockly.DRAG_NONE; Blockly.terminateDrag_(); + Blockly.WidgetDiv.hide(true); + Blockly.DropDownDiv.hideWithoutAnimation(); Blockly.hideChaff(); if (Blockly.isRightButton(e)) { // Right-click. @@ -774,6 +776,8 @@ Blockly.Flyout.prototype.onMouseDown_ = function(e) { if (Blockly.isRightButton(e)) { return; } + Blockly.WidgetDiv.hide(true); + Blockly.DropDownDiv.hideWithoutAnimation(); Blockly.hideChaff(true); Blockly.Flyout.terminateDrag_(); this.startDragMouseY_ = e.clientY;