Simple fix to improve the detection for real touch based devices
- fixes the false positive seen on Windows 8 (Chrome, FF)
I'm not sure what you're testing on, but that produces two different results on a touch enabled Win8 laptop.
in FF latest
>>> typeof window.Touch
in Chrome latest
the original test ("ontouchstart" in window) is true on both
("ontouchstart" in window)
Yeah, I don't have that type of device to test against...let me think about this some more.
@roblarsen Just curious, what's the make/model of that device? One of the guys here has a surface pro, trying to find something to test against.
A Lenovo Yoga 13
Ok, to clairfy once again, Modernizr.touch is not intended to detect touch devices. It detects support for the Touch Events API, which I think this test does reliably... the exceptions seen on #880 seem to be cases whereby the APIs are enabled unexpectedly.
We don't believe it's currently possible to detect touch-capable devices reliably... see this thread: #548.
So I'm afraid I'm going to kill this. Let's carry on the discussion about why we're getting false-positives in Win 8 on #880.