From 225ba46ce0bfd40ff5dd198c218da27c0c6dfd37 Mon Sep 17 00:00:00 2001 From: Joel Date: Sun, 28 Sep 2014 14:38:57 -0700 Subject: [PATCH] Don't trigger click when the left mouse is not the one doing the clicking --- scripts/ripples.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/ripples.js b/scripts/ripples.js index 80e33c7b..27854482 100644 --- a/scripts/ripples.js +++ b/scripts/ripples.js @@ -61,7 +61,10 @@ var ripples = { // Dirty fix for Firefox... seems like absolute elements inside tags do not trigger the "click" event if (/firefox|crios|(^(?!.*chrome).*safari)|ip(ad|hone|od)/i.test(navigator.userAgent)) { - $el.click(); + var button = e.which || e.button; + if (button == 1) { + $el.click(); + } } // This function is called when the animation is finished