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

Commit

Permalink
Make sure event.bubbles is explicitly set when dispatching events
Browse files Browse the repository at this point in the history
Laziness with enter/leave usage and shared pointer event template clones lead to missing downs.

Fixes googlearchive/PointerGestures#22
  • Loading branch information
dfreedm committed Feb 12, 2014
1 parent e923472 commit 255b547
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,15 @@
},
// EVENTS
down: function(inEvent) {
inEvent.bubbles = true;
this.fireEvent('pointerdown', inEvent);
},
move: function(inEvent) {
inEvent.bubbles = true;
this.fireEvent('pointermove', inEvent);
},
up: function(inEvent) {
inEvent.bubbles = true;
this.fireEvent('pointerup', inEvent);
},
enter: function(inEvent) {
Expand All @@ -163,6 +166,7 @@
this.fireEvent('pointerout', inEvent);
},
cancel: function(inEvent) {
inEvent.bubbles = true;
this.fireEvent('pointercancel', inEvent);
},
leaveOut: function(event) {
Expand Down

0 comments on commit 255b547

Please sign in to comment.