Skip to content

Commit

Permalink
closes #23 - events should fire when moving off the page
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmalonenz committed Oct 17, 2016
1 parent f3f7b53 commit 44687e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dragula.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,18 @@ export class Dragula {

_events(remove) {
let op = remove ? 'removeEventListener' : 'addEventListener';
touchy(document.body, op, 'mousedown', this.boundGrab);
touchy(document.body, op, 'mouseup', this.boundRelease);
touchy(document.documentElement, op, 'mousedown', this.boundGrab);
touchy(document.documentElement, op, 'mouseup', this.boundRelease);
}

_eventualMovements(remove) {
let op = remove ? 'removeEventListener' : 'addEventListener';
touchy(document.body, op, 'mousemove', this.boundStart);
touchy(document.documentElement, op, 'mousemove', this.boundStart);
}

_movements(remove) {
let op = remove ? 'removeEventListener' : 'addEventListener';
touchy(document.body, op, 'click', this.boundPreventGrabbed);
touchy(document.documentElement, op, 'click', this.boundPreventGrabbed);
}

destroy() {
Expand Down

0 comments on commit 44687e4

Please sign in to comment.