public static native boolean isOnTouchDevice()/*-{
return 'ontouchstart' in window || navigator.maxTouchPoints;
}-*/;
I seem to remember that touch-enabled couldn't be detected, because one could also just plug a touch screen to the device while the browser is open (and a page loaded!)
So this is likely to generate a lot of false positives.
What about laptops with touch screens? (Surface, Chrome Pixel, etc.) Maybe the user will use the mouse primarily in those? Maybe not?I seem to remember that touch-enabled couldn't be detected, because one could also just plug a touch screen to the device while the browser is open (and a page loaded!)
So this is likely to generate a lot of false positives.