I am developing a site that implements certain functions for touch screen devices. I am targeting smartphones, tablets, and actually everything that uses the touch screen as the main input.
For this I use Modernizr Modernizr.touch
However, this returns true on chrome with computers on which the Wacom tablet is installed. (Confirmed with Wacom Intuos 5). Obviously, the main input device on these computers is the keyboard and mouse, not the touch screen. This creates a false positive because I want to deliver desktop UX for those computers, not touch screen UX.
Is there a way to test for “touch screen capabilities” rather than “touch capabilities”? Or any other creative method to get around this and avoid false positives?
source
share