Affecting Touch event support has been re-enabled on Windows desktop

Published: | Categories: DOM

Description

The support for the standard touch events on Windows desktop platforms, introduced with Firefox 18 but disabled with Firefox 24 due to various site compatibility issues, is now enabled again with Firefox 52. On Firefox Nightly, this has already been enabled since Firefox 47.

On touchscreen devices, the Touch, TouchEvent and TouchList interfaces will be exposed on window along with the ontouchstart, ontouchmove, ontouchend and ontouchcancel properties.

While most of the compatibility issues previously reported have been solved by Firefox or the sites in question, there may still be some more unreported bugs. Basically, Web developers should never rely on touch events to detect if the user is on mobile, otherwise your site may cause unexpected UX issues on desktop and laptop computers with a touchscreen.

if ('ontouchstart' in window) {
  // This is not mobile detection but touch detection!
}

For a quick test, you can use the Responsive Design Mode in Firefox Developer Tools to simulate touch events. See this Mozilla Hacks article for the details on touch detection.

Update: Ext JS 6 is currently broken due to this change.

References