3 ms·
So generally a quick way to prevent that sort of stuff from happening on mobile is to tack this CSS onto the elements in question (canvas, img, etc): touch
by davidsojevic 6y ago
So generally a quick way to prevent that sort of stuff from happening on mobile is to tack this CSS onto the elements in question (canvas, img, etc):
touch-action: none;
-ms-touch-action: none;
user-select: none;
That should prevent any touch related actions and accidental user selection on devices.
See MDN for details on each:
https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action https://developer.mozilla.org/en-US/docs/Web/CSS/touch-actio...
https://developer.mozilla.org/en-US/docs/Web/CSS/user-select https://developer.mozilla.org/en-US/docs/Web/CSS/user-select
- tomjacobs 6y agodone, thanks! didn't seem to work though