When a user clicks on an anchor like so:
<a href="#">
Hello
<div class="rippleJS"></div>
</a>
Then drags away after a mousedown event, a mouseup event never fires. This is because a dragging starts, as most developers do not add draggable="false" to their anchors. Thus, the ripple stays until the users click in the document elsewhere.
This can be remedied by checking if the tagName of the ripple's parent is "A" and then also checking if a "mouseup" event is being listened after mousedown. Simply check for a "dragend" as well to fire the same function.
Identified in Chromium-based v71.0.3578.98
When a user clicks on an anchor like so:
Then drags away after a mousedown event, a mouseup event never fires. This is because a dragging starts, as most developers do not add
draggable="false"to their anchors. Thus, the ripple stays until the users click in the document elsewhere.This can be remedied by checking if the tagName of the ripple's parent is "A" and then also checking if a "mouseup" event is being listened after mousedown. Simply check for a "dragend" as well to fire the same function.
Identified in Chromium-based v71.0.3578.98