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.
This commit is contained in:
Rodrigo Queiro 2016-05-09 09:02:25 -07:00
parent f212b10870
commit 8415db4085

View file

@ -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;