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

Commit

Permalink
Merge pull request #122 from Polymer/always-enter-leave
Browse files Browse the repository at this point in the history
Implement spec update for non-hover pointers issuing enter and leave
  • Loading branch information
dfreedm committed Jan 27, 2014
2 parents f7dd105 + 275d2cb commit 1b6e77c
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 1b6e77c

Please sign in to comment.