Enabling Touch Events everywhere

As we've discussed before, there's still significant issues that block us from shipping Touch Events everywhere. Primarily, these are attributed to patterns like:

if('touchstart' in document.body) {
    elm.addEventListener('touchstart',fn1);
}else{
    elm.addEventListener('mousedown', fn2); //only registered on browsers/devices without Touch Events
}

We've only begun to test sites for this issue. In testing the top 100 sites, we found 10 sites with broken mouse functionality when Touch Events is exposed. So we expect this to trend to significant impact across the larger web.

For impacted sites that we've found, we've started tracking site outreach over at webcompat.com.  I'll keep the group updated on what success we have here. Though I suspect asking sites to change their code for a problem that doesn't exist in browsers' default configuration (aside from using Chrome with a mouse on a device that also has a touchscreen) may be difficult.  We'd appreciate any support from others in this group in finding, diagnosing, and outreaching here so that we can hopefully one day make the type system consistent across devices.

https://github.com/webcompat/web-bugs/issues/309
https://github.com/webcompat/web-bugs/issues/304
https://github.com/webcompat/web-bugs/issues/306
https://github.com/webcompat/web-bugs/issues/307
https://github.com/webcompat/web-bugs/issues/308
https://github.com/webcompat/web-bugs/issues/310
https://github.com/webcompat/web-bugs/issues/311
https://github.com/webcompat/web-bugs/issues/305

Note that there are a couple other sites that Microsoft has conversations with already, so we didn't duplicate these on webcompat.

-Jacob

Received on Friday, 5 September 2014 21:34:21 UTC