Skip to content

Commit

Permalink
fix(utils): handle touch based on their event's type
Browse files Browse the repository at this point in the history
  • Loading branch information
yoannmoinet committed Oct 4, 2015
1 parent e3f96ef commit 406a7b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ u.trigger = function (el, type, data) {

u.prepareEvent = function (evt) {
evt.preventDefault();
return isTouch ? evt.changedTouches : evt;
return evt.type.match(/^touch/) ? evt.changedTouches : evt;
};

u.getScroll = function () {
Expand Down

0 comments on commit 406a7b2

Please sign in to comment.