4 ms·
> I cannot detect mouse support, except on the assumption of no touch support. Bad assumption, you can have a desktop with a touch screen monitor, or a tablet
by MatthewPhillips 14y ago
> I cannot detect mouse support, except on the assumption of no touch support.
Bad assumption, you can have a desktop with a touch screen monitor, or a tablet with a bluetooth mouse.
> But to check for touch support, all you have to do is test for the existence of ontouchstarted on the window object.
Firefox uses the same codebase for desktop and mobile, so you'll get false positives on laptops and desktops.
It's silly the hoops we jump through to get to 75% certainty on a feature.