Disabling document.createEvent("TouchEvent"), document.createTouch* and ontouch* event handlers on desktop

Hi all,


I'm trying to disable document.createEvent("TouchEvent"), document.createTouch* and ontouch* event handlers on desktop in
order to follow what has been done in other browsers.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1412485
The issue is that some web pages use those features to detect whether touch is enabled, and if so, don't
expect mouse events.
https://github.com/w3c/touch-events/issues/64 has also some background.

The behavior will be behind dom.w3c_touch_events.legacy_apis.enabled pref, set to false by default on desktop.
(Touch API itself is enabled if touchscreen is detected)



-Olli
0
smaug
3/6/2019 5:18:18 PM
mozilla.dev.platform 6504 articles. 0 followers. Post Follow

0 Replies
13 Views

Similar Articles

[PageSpeed] 15

Reply: