diff --git a/core/bubble.js b/core/bubble.js index a90e5f86d..413a510cf 100644 --- a/core/bubble.js +++ b/core/bubble.js @@ -145,11 +145,11 @@ Blockly.Bubble.unbindDragEvents_ = function() { }; /* - * Handle a mouse-up event while dragging a bubble's border. + * Handle a mouse-up event while dragging a bubble's border or resize handle. * @param {!Event} e Mouse up event. * @private */ -Blockly.Bubble.bubbleMouseUp_ = function(e) { +Blockly.Bubble.bubbleMouseUp_ = function(/*e*/) { Blockly.clearTouchIdentifier(); Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN); Blockly.Bubble.unbindDragEvents_(); @@ -328,7 +328,7 @@ Blockly.Bubble.prototype.resizeMouseDown_ = function(e) { this.workspace_.RTL ? -this.width_ : this.width_, this.height_)); 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.resizeMouseMove_); Blockly.hideChaff(); diff --git a/core/workspace_svg.js b/core/workspace_svg.js index a3c0b5344..1997886f0 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -704,6 +704,7 @@ Blockly.WorkspaceSvg.prototype.isDeleteArea = function(e) { Blockly.WorkspaceSvg.prototype.onMouseDown_ = function(e) { this.markFocused(); if (Blockly.isTargetInput_(e)) { + Blockly.clearTouchIdentifier(); return; } Blockly.terminateDrag_(); // In case mouse-up event was lost. @@ -718,6 +719,7 @@ Blockly.WorkspaceSvg.prototype.onMouseDown_ = function(e) { if (Blockly.isRightButton(e)) { // Right-click. this.showContextMenu_(e); + Blockly.clearTouchIdentifier(); } else if (this.scrollbar) { this.dragMode_ = Blockly.DRAG_BEGIN; // Record the current mouse position.