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

Commit

Permalink
always use buttons property if supplied, even if MouseEvent does not …
Browse files Browse the repository at this point in the history
…support it
  • Loading branch information
dfreedm committed Mar 1, 2014
1 parent b74b52c commit ccf2629
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PointerEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
// This is fixed with DOM Level 4's use of buttons
var buttons = inDict.buttons;
// touch has two possible buttons state: 0 and 1, rely on being told the right one
if (!HAS_BUTTONS && inType !== 'touch') {
if (!HAS_BUTTONS && !buttons && inType !== 'touch') {
switch (inDict.which) {
case 1: buttons = 1; break;
case 2: buttons = 4; break;
Expand Down

0 comments on commit ccf2629

Please sign in to comment.