mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
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:
parent
f212b10870
commit
8415db4085
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue