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 <
> <>> 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)?

Patrick H. Lauke | |
twitter: @patrick_h_lauke | skype: patrick_h_lauke

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