mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Reset cursor and touch identifier in the bubble instead of relying on Blockly.onMouseUp
This commit is contained in:
parent
b77c080678
commit
b3cd33d440
1 changed files with 12 additions and 1 deletions
|
@ -144,6 +144,17 @@ Blockly.Bubble.unbindDragEvents_ = function() {
|
|||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* Handle a mouse-up event while dragging a bubble's border.
|
||||
* @param {!Event} e Mouse up event.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Bubble.bubbleMouseUp_ = function(e) {
|
||||
Blockly.touchIdentifier_ = null;
|
||||
Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN);
|
||||
Blockly.Bubble.unbindDragEvents_();
|
||||
};
|
||||
|
||||
/**
|
||||
* Flag to stop incremental rendering during construction.
|
||||
* @private
|
||||
|
@ -275,7 +286,7 @@ Blockly.Bubble.prototype.bubbleMouseDown_ = function(e) {
|
|||
this.relativeTop_));
|
||||
|
||||
Blockly.Bubble.onMouseUpWrapper_ = Blockly.bindEvent_(document,
|
||||
'mouseup', this, Blockly.Bubble.unbindDragEvents_);
|
||||
'mouseup', this, Blockly.Bubble.bubbleMouseUp_);
|
||||
Blockly.Bubble.onMouseMoveWrapper_ = Blockly.bindEvent_(document,
|
||||
'mousemove', this, this.bubbleMouseMove_);
|
||||
Blockly.hideChaff();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue