Skip to content

Commit

Permalink
Fix element.click() sending tap on IE10
Browse files Browse the repository at this point in the history
IE 10 uses current mouse position for clientX and clientY, which breaks the
TAP_DISTANCE function.
Use NaN as a default start position to mitigate

Fixes #1640 [1.0] Tap gesture does not trigger when calling `this.click` in IE10
  • Loading branch information
dfreedm committed May 28, 2015
1 parent bdf191b commit 777a5bc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/standard/gestures.html
Original file line number Diff line number Diff line change
Expand Up @@ -411,12 +411,12 @@
deps: ['mousedown', 'click', 'touchstart', 'touchend'],
emits: ['tap'],
start: {
x: 0,
y: 0
x: NaN,
y: NaN
},
reset: function() {
this.start.x = 0;
this.start.y = 0;
this.start.x = NaN;
this.start.y = NaN;
},
save: function(e) {
this.start.x = e.clientX;
Expand Down

0 comments on commit 777a5bc

Please sign in to comment.