From 4c63643646f89e3c30a31cd38ac3b8434bea6295 Mon Sep 17 00:00:00 2001 From: Mahmoud Aldaas Date: Wed, 13 Jun 2018 14:22:26 +0200 Subject: [PATCH] https://github.com/PygmySlowLoris/vue-ripple-directive/issues/21 --- src/ripple.js | 4 ++++ 1 file changed, 4 insertions(+) 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(); }