From ffd66f437784f4886c9ebedc9961ccfb781c0e39 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Mon, 18 Jun 2018 20:55:13 +1200 Subject: [PATCH] Make desktop left and right mouse button actions independent --- scripts/system/controllers/grab.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/system/controllers/grab.js b/scripts/system/controllers/grab.js index a835373e4d..ae5324ff4b 100644 --- a/scripts/system/controllers/grab.js +++ b/scripts/system/controllers/grab.js @@ -315,7 +315,7 @@ Grabber.prototype.pressEvent = function(event) { return; } - if (event.isLeftButton !== true || event.isRightButton === true || event.isMiddleButton === true) { + if (event.button !== "LEFT") { return; } @@ -419,7 +419,7 @@ Grabber.prototype.pressEvent = function(event) { }; Grabber.prototype.releaseEvent = function(event) { - if ((event.isLeftButton!==true || event.isRightButton===true || event.isMiddleButton===true) && !HMD.active) { + if (event.button !== "LEFT" && !HMD.active) { return; }