diff --git a/src/ripple.js b/src/ripple.js index 55179c0..f1411f7 100644 --- a/src/ripple.js +++ b/src/ripple.js @@ -105,6 +105,8 @@ var Ripple = { }, 850); el.removeEventListener('mouseup', clearRipple, false); + el.removeEventListener('mouseleave', clearRipple, false); + el.removeEventListener('dragstart', clearRipple, false); // After removing event set position to target to it's original one // Timeout it's needed to avoid jerky effect of ripple jumping out parent target @@ -130,6 +132,8 @@ var Ripple = { if(event.type === 'mousedown') { el.addEventListener('mouseup', clearRipple, false); + el.addEventListener('mouseleave', clearRipple, false); + el.addEventListener('dragstart', clearRipple, false); } else { clearRipple(); }