From 616d1af1a411510882ccf0b6bdc7b2fe9caa9f92 Mon Sep 17 00:00:00 2001 From: Brian Clifton Date: Thu, 18 Aug 2016 14:01:40 -0700 Subject: [PATCH] Fix secondary actions. Adding the parens breaks this method (causing all secondary actions to fail) Auditors: @bbondy --- js/lib/eventUtil.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/lib/eventUtil.js b/js/lib/eventUtil.js index 56a0d002d80..36255cd2345 100644 --- a/js/lib/eventUtil.js +++ b/js/lib/eventUtil.js @@ -3,11 +3,10 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ const isDarwin = process.platform === 'darwin' -module.exports.isForSecondaryAction = (e) => { +module.exports.isForSecondaryAction = (e) => e.ctrlKey && !isDarwin || e.metaKey && isDarwin || e.button === 1 -} module.exports.eventElHasAncestorWithClasses = (e, classesToCheck) => { let node = e.target