Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Implement spec update for non-hover pointers issuing enter and leave
Browse files Browse the repository at this point in the history
https://dvcs.w3.org/hg/pointerevents/rev/95b152ce34eb

fix ordering of over,enter and leave,down
  • Loading branch information
dfreedm committed Jan 27, 2014
1 parent 8045762 commit 275d2cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,16 @@
this.fireEvent('pointercancel', inEvent);
},
leaveOut: function(event) {
this.out(event);
if (!this.contains(event.target, event.relatedTarget)) {
this.leave(event);
}
this.out(event);
},
enterOver: function(event) {
this.over(event);
if (!this.contains(event.target, event.relatedTarget)) {
this.enter(event);
}
this.over(event);
},
// LISTENER LOGIC
eventHandler: function(inEvent) {
Expand Down
3 changes: 3 additions & 0 deletions src/touch.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@
outTarget: inPointer.target
});
dispatcher.over(inPointer);
dispatcher.enter(inPointer);
dispatcher.down(inPointer);
},
touchmove: function(inEvent) {
Expand Down Expand Up @@ -292,6 +293,7 @@
if (!this.scrolling) {
dispatcher.up(inPointer);
dispatcher.out(inPointer);
dispatcher.leave(inPointer);
}
this.cleanUpPointer(inPointer);
},
Expand All @@ -301,6 +303,7 @@
cancelOut: function(inPointer) {
dispatcher.cancel(inPointer);
dispatcher.out(inPointer);
dispatcher.leave(inPointer);
this.cleanUpPointer(inPointer);
},
cleanUpPointer: function(inPointer) {
Expand Down

0 comments on commit 275d2cb

Please sign in to comment.