diff --git a/dist/all.min.js.gz b/dist/all.min.js.gz index 1abbe1f2..c7976b5d 100644 Binary files a/dist/all.min.js.gz and b/dist/all.min.js.gz differ diff --git a/src/canvas_events.mixin.js b/src/canvas_events.mixin.js index de0c6939..349b8244 100644 --- a/src/canvas_events.mixin.js +++ b/src/canvas_events.mixin.js @@ -55,13 +55,13 @@ _onMouseDown: function (e) { this.__onMouseDown(e); - addListener(fabric.document, 'mouseup', this._onMouseUp); + !fabric.isTouchSupported && addListener(fabric.document, 'mouseup', this._onMouseUp); fabric.isTouchSupported && addListener(fabric.document, 'touchend', this._onMouseUp); - addListener(fabric.document, 'mousemove', this._onMouseMove); + !fabric.isTouchSupported && addListener(fabric.document, 'mousemove', this._onMouseMove); fabric.isTouchSupported && addListener(fabric.document, 'touchmove', this._onMouseMove); - removeListener(this.upperCanvasEl, 'mousemove', this._onMouseMove); + !fabric.isTouchSupported && removeListener(this.upperCanvasEl, 'mousemove', this._onMouseMove); fabric.isTouchSupported && removeListener(this.upperCanvasEl, 'touchmove', this._onMouseMove); }, @@ -72,13 +72,13 @@ _onMouseUp: function (e) { this.__onMouseUp(e); - removeListener(fabric.document, 'mouseup', this._onMouseUp); + !fabric.isTouchSupported && removeListener(fabric.document, 'mouseup', this._onMouseUp); fabric.isTouchSupported && removeListener(fabric.document, 'touchend', this._onMouseUp); - removeListener(fabric.document, 'mousemove', this._onMouseMove); + !fabric.isTouchSupported && removeListener(fabric.document, 'mousemove', this._onMouseMove); fabric.isTouchSupported && removeListener(fabric.document, 'touchmove', this._onMouseMove); - addListener(this.upperCanvasEl, 'mousemove', this._onMouseMove); + !fabric.isTouchSupported && addListener(this.upperCanvasEl, 'mousemove', this._onMouseMove); fabric.isTouchSupported && addListener(this.upperCanvasEl, 'touchmove', this._onMouseMove); }, @@ -478,4 +478,4 @@ return true; } }); -})(); \ No newline at end of file +})();