Re: Chrome change in TouchEvent feature detection

On 22/12/2016 20:40, Rick Byers wrote:
> On Thu, Dec 22, 2016 at 4:54 AM, Olli Pettay <olli@pettay.fi
> <mailto:olli@pettay.fi>> wrote:
[...]
>     `if ("TouchEvent" in window)` is one way to detect the feature (IMO
>     the right one even), though not sure how often
>     that is used.
>
> Right, hopefull that's what people are relying on to detect support for
> TouchEvents, and using the other common patterns (mainly "'ontouchstart'
> in window" just as a hack to detect mobile devices).

If I'm understanding this right, `if("TouchEvent" in window)` will now 
always return true then (even without touchscreen)? So if devs are using 
that particular sniff in a misguided "if it's true, it means there's 
touch, so I can just listen to touch" their sites will still now 
potentially fail for mouse users all the time (not just when there's an 
additional touchscreen present)?

P
-- 
Patrick H. Lauke

www.splintered.co.uk | https://github.com/patrickhlauke
http://flickr.com/photos/redux/ | http://redux.deviantart.com
twitter: @patrick_h_lauke | skype: patrick_h_lauke

Received on Saturday, 24 December 2016 20:04:17 UTC