diff --git a/core/touch_gesture.js b/core/touch_gesture.js index 6ff5dfcfe..67ee03238 100644 --- a/core/touch_gesture.js +++ b/core/touch_gesture.js @@ -135,6 +135,7 @@ Blockly.TouchGesture.prototype.bindMouseEvents = function(e) { /*opt_noCaptureIdentifier*/ true); e.preventDefault(); + e.stopPropagation(); }; /** @@ -143,7 +144,7 @@ Blockly.TouchGesture.prototype.bindMouseEvents = function(e) { * @package */ Blockly.TouchGesture.prototype.handleStart = function(e) { - if (!this.isDragging) { + if (this.isDragging()) { // A drag has already started, so this can no longer be a pinch-zoom. return; } @@ -238,8 +239,8 @@ Blockly.TouchGesture.prototype.handleTouchStart = function(e) { var point1 = this.cachedPoints_[pointers[1]]; this.startDistance_ = goog.math.Coordinate.distance(point0, point1); this.isMultiTouch_ = true; + e.preventDefault(); } - e.preventDefault(); }; /** @@ -272,8 +273,8 @@ Blockly.TouchGesture.prototype.handleTouchMove = function(e) { workspace.zoom(position.x, position.y, delta); } this.previousScale_ = scale; + e.preventDefault(); } - e.preventDefault(); }; /**