Skip to content

Commit

Permalink
do not raise error on multitouch gestures when coords.offset or e.pre…
Browse files Browse the repository at this point in the history
…ventDefault is not defined
  • Loading branch information
Aivars Akots committed Mar 4, 2016
1 parent 9078bc4 commit 3df0a09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
end: function(e) {
e = utils.getRealEvent(e);

if (coords.offset[0] < Tap.options.fingerMaxOffset && coords.offset[1] < Tap.options.fingerMaxOffset && !utils.fireFakeEvent(e, Tap.options.eventName)) {
if (coords.offset && e.preventDefault && coords.offset[0] < Tap.options.fingerMaxOffset && coords.offset[1] < Tap.options.fingerMaxOffset && !utils.fireFakeEvent(e, Tap.options.eventName)) {
// Windows Phone 8.0 trigger `click` after `pointerup` firing
// #16 https://github.com/pukhalski/tap/issues/16
if (window.navigator.msPointerEnabled || window.navigator.pointerEnabled) {
Expand Down

0 comments on commit 3df0a09

Please sign in to comment.