Setting pointer-events:none
seems to also turn off touch events. This obviously doesn't make sense, because "touch" events aren't "pointer" events. My finger is not a pointer. :)
Is there some way to turn off only pointer/mouse events, but leave touch events alone? A property like touch-events
would be nice.
There is no way to disable only mouse events through CSS. But you can easily do it with javascript:
Check touch support by using Modernizr or simply see a discussion about touch detection How can I detect device touch support in JavaScript?
If touch events are not supported, apply a CSS class (you previously created) or directly add the CSS rule on all the elements you want to ignore pointer events.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments