Skip to content

Commit

Permalink
remove more events
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur committed Jun 3, 2018
1 parent 4af1c0d commit 061d047
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mixins/canvas_events.mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@
removeListener(this.upperCanvasEl, 'dragenter', this._onDragEnter);
removeListener(this.upperCanvasEl, 'dragleave', this._onDragLeave);
removeListener(this.upperCanvasEl, 'drop', this._onDrop);
// if you dispose on a mouseDown, before mouse up, you need to clean document to...
removeListener(fabric.document, 'mouseup', this._onMouseUp);
removeListener(fabric.document, 'touchend', this._onMouseUp, addEventOptions);
removeListener(fabric.document, 'mousemove', this._onMouseMove, addEventOptions);
removeListener(fabric.document, 'touchmove', this._onMouseMove, addEventOptions);

if (typeof eventjs !== 'undefined' && 'remove' in eventjs) {
eventjs.remove(this.upperCanvasEl, 'gesture', this._onGesture);
Expand Down

0 comments on commit 061d047

Please sign in to comment.