Issue metadata
Sign in to add a comment
|
('ontouchstart' in window) is true but the device is not touch
Reported by
marco.pr...@spreaker.com,
Dec 23 2016
|
||||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
Steps to reproduce the problem:
1. Run `("ontouchstart" in window)` on Windows 10 running on a Laptop
2. It returns `true`
What is the expected behavior?
The same version of Chrome running on Mac or Firefox latest on Windows do return `false`, while Chrome on Windows return `true`.
What went wrong?
Despite this is formally correct, because Chrome on Windows do support touch event listeners, this actually breaks some web applications that relies on this check to "guess" if it's a touch device and improve the UX accordingly (some UI can benefit from a mouse).
Did this work before? Yes According to issue #467934 it was fixed, then came back on Chrome 54
Chrome version: 55.0.2883.87 Channel: stable
OS Version: 10
Flash Version:
,
Dec 23 2016
I was using the pointer media query to determine the presence of a touch device, but starting from Chrome 55 Android on Nexus 5x matches the "(pointer: fine)" media query, so I'm not sure how to reliably use it. Any hint?
,
Dec 23 2016
Yikes! That's a real regression, thanks for bringing that up. It appears fixed in Canary (M57) but still broken in Beta. I'll try to find the fixing patch and see if we can get that shipped sooner.
,
Dec 23 2016
Ok, this is already known ( issue 672907 ) and will be merged to beta so the issue should be resolved in M56.
,
Mar 2 2017
#4 M56 doesn't fix the issue.
,
Mar 3 2017
If you're referring to the issue in #2 then it seems fixed for me in M56 (see http://bokand.github.io/mq.html). Hover:none seems to be broken instead (sigh), I filed issue 654861 . If you're referring to the original report then see my comment in #1 - it's likely not a Chrome bug. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by bokan@chromium.org
, Dec 23 2016Components: -Blink Blink>Input
Mergedinto: 557565
Status: Duplicate (was: Unconfirmed)