From f6983545254f6e36c9c6fc8a3c1ee3563d6d9eec Mon Sep 17 00:00:00 2001 From: Joel Date: Wed, 17 Sep 2014 16:12:44 -0700 Subject: [PATCH] Fixes problem where ripples would stop clicks from going through on Firefox, and prevents double-clicks from happening in Chrome. Closes #20 --- scripts/ripples.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/ripples.js b/scripts/ripples.js index 5f3b54da..1f25238b 100644 --- a/scripts/ripples.js +++ b/scripts/ripples.js @@ -65,6 +65,11 @@ var ripples = { }, rippleStartTime); + if (target.tagName == 'A' || target.parentNode.tagName == 'A') { + if (e.buttons == 1) { + target.click(); + } + } }; var rippleOut = function($ripple) { @@ -73,7 +78,6 @@ var ripples = { // Let ripple fade out (with CSS) setTimeout(function() { - $ripple.parentNode.parentNode.click(); $ripple.remove(); }, rippleOutTime); };