From ccf26296bac8c45fb3bffb757019d4033f8d91b8 Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Fri, 28 Feb 2014 17:19:07 -0800 Subject: [PATCH] always use buttons property if supplied, even if MouseEvent does not support it --- src/PointerEvent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PointerEvent.js b/src/PointerEvent.js index e3652301..c1f7e2c9 100644 --- a/src/PointerEvent.js +++ b/src/PointerEvent.js @@ -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;