mladenplavsic / css-ripple-effect

Pure CSS (no JavaScript) implementation of Android Material design "ripple" animation
http://mladenplavsic.github.io/css-ripple-effect
MIT License
341 stars 110 forks source link

Right clicking triggers the ripple #5

Open Arkh1 opened 7 years ago

Arkh1 commented 7 years ago

Probably want to restrict the ripple effect to only left click actions. Triggering the ripple on right click is misleading.

Tested in Windows 10 Chrome Version 55.0.2883.87 m (64-bit)

mladenplavsic commented 7 years ago

This is a pure CSS implementation of "ripple" effect, and there is no way to know difference between left and right click. Actually, :active pseudo class is used to detect user's interaction, which could be left/right click or touch events.

I guess that majority of users will just use left click or touch, but if you really need that "ripple" removed for right click I suggest using one of the JS implementations of this animation.

If there is another solution please bring it on!