diff --git a/scripts/ripples.js b/scripts/ripples.js index 052c8295..839b2851 100644 --- a/scripts/ripples.js +++ b/scripts/ripples.js @@ -109,7 +109,12 @@ var ripples = { bind("mouseover", withRipple, rippleInit); // start ripple effect on mousedown - bind("mousedown", ".ripple-wrapper", rippleStart); + bind("mousedown", ".ripple-wrapper", function(e, $ripple) { + // Start ripple only on left or middle mouse click + if (e.which === 1 || e.which === 2) { + rippleStart(e, $ripple); + } + }); // if animation ends and user is not holding mouse then destroy the ripple bind("rippleEnd", ".ripple-wrapper .ripple", function(e, $ripple) { diff --git a/template/material/scripts/ripples.js b/template/material/scripts/ripples.js index 052c8295..839b2851 100644 --- a/template/material/scripts/ripples.js +++ b/template/material/scripts/ripples.js @@ -109,7 +109,12 @@ var ripples = { bind("mouseover", withRipple, rippleInit); // start ripple effect on mousedown - bind("mousedown", ".ripple-wrapper", rippleStart); + bind("mousedown", ".ripple-wrapper", function(e, $ripple) { + // Start ripple only on left or middle mouse click + if (e.which === 1 || e.which === 2) { + rippleStart(e, $ripple); + } + }); // if animation ends and user is not holding mouse then destroy the ripple bind("rippleEnd", ".ripple-wrapper .ripple", function(e, $ripple) {