RESOLVED FIXED 106071
Existence of window.Touch can break websites mobile device detection
https://bugs.webkit.org/show_bug.cgi?id=106071
Summary Existence of window.Touch can break websites mobile device detection
Rick Byers
Reported 2013-01-03 18:24:23 PST
In bug 96295, I added window.Touch and window.TouchList constructors when built with TOUCH_EVENTS. At least one web app uses the existance of window.Touch to infer that they're on a mobile default (and so shouldn't listen to mouse events). This is completely broken and we need to get such sites fixed, but our strategy should be the same as for more common (but equally wrong) check sites do like looking for window.ontouchstart (which, for now, we enable dynamically at runtime - eg. based on whether or not a touch screen is actually present) For now (Chrome M25) I'm going to revert my change. I'll file a separate bug to put these back but controlled dynamically.
Attachments
Patch (7.55 KB, patch)
2013-01-03 18:32 PST, Rick Byers
no flags
Rick Byers
Comment 1 2013-01-03 18:32:01 PST
Rick Byers
Comment 2 2013-01-03 18:34:31 PST
Will track re-landing this in the original bug: bug 96295
WebKit Review Bot
Comment 3 2013-01-04 09:59:29 PST
Comment on attachment 181258 [details] Patch Clearing flags on attachment: 181258 Committed r138808: <http://trac.webkit.org/changeset/138808>
WebKit Review Bot
Comment 4 2013-01-04 09:59:34 PST
All reviewed patches have been landed. Closing bug.
Rick Byers
Comment 5 2013-01-04 10:27:35 PST
Thanks Ojan!
Note You need to log in before you can comment on or make changes to this bug.