Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Make sure "up" for tap also is from the left button
Browse files Browse the repository at this point in the history
Fixes #59 Tap fires for right-mouse clicks
  • Loading branch information
dfreedm committed Sep 23, 2014
1 parent 1257576 commit 748b65c
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 @@ -61,7 +61,7 @@
shouldTap: function(e, downState) {
if (e.pointerType === 'mouse') {
// only allow left click to tap for mouse
return downState.buttons === 1;
return e.buttons === 1 && downState.buttons === 1;
}
return !e.tapPrevented;
},
Expand Down

0 comments on commit 748b65c

Please sign in to comment.