Issue metadata
Sign in to add a comment
|
('ontouchstart' in window) is true
Reported by
thomasfr...@googlemail.com,
Nov 29 2016
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36
Steps to reproduce the problem:
1. Use Javascript and try to detect if it´s a touch device, like:
isTouchDevice = function is_touch_device() {
return 'ontouchstart' in window // works on most browsers
|| navigator.maxTouchPoints; // works on IE10/11 and Surface
};
2. Chrome returns true since version ~ 54.0.2840.71
What is the expected behavior?
Return false, as it is no touch device.
What went wrong?
Chrome returns true since version ~ 54.0.2840.71
Did this work before? Yes
Chrome version: 54.0.2840.99 Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 23.0 r0
Already described here (but no response - cause it´s marked with "WontFix" or cause it´s old?): https://bugs.chromium.org/p/chromium/issues/detail?id=467934&can=2&start=0&num=100&q=&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified&groupby=&sort=
,
Nov 29 2016
Works fine on Windows 10, 54.0.2840.99 'ontouchstart' in window || navigator.maxTouchPoints; result is 0 when typed into devtools console. There are few things that this might appear true under 1) Do you have the flag on as rbyers@ indicated? 2) Did you activate devtools? If you enter device simulation it enables touch events. Other than that perhaps you have a device reporting that it is a hid touch capable?
,
Nov 29 2016
Thanks Dave. > Other than that perhaps you have a device reporting that it is a hid touch capable? For instructions on how to answer whether that is the case see issue 557565. If you're still able to reproduce this issue on your machine, but we can't reproduce it on any of ours, then you could use https://www.chromium.org/developers/bisect-builds-py to try to determine precisely when the behavior changed for you.
,
Nov 30 2016
Hey Guy´s, i had an issue in my code, which caused this chrome behavior (while working correctly at Firefox). Whatever, fixed it and everything is fine now. Thank´s for your help and sorry for wasting your time! -_- With kind regards
,
Nov 30 2016
Closing as per comment #4. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by rbyers@chromium.org
, Nov 29 2016Components: -Blink Blink>Input
Labels: Hotlist-Input-Dev