ontouchstart, ontouchmove event handlers are now passive by default

Published: | Categories: DOM


Starting with Firefox 70, event handlers set with the ontouchstart or ontouchmove property on window, document, document.documentElement or document.body will be treated as passive by default, which means the event cannot be cancelled with preventDefault() within the handler method.

Firefox 61 has already made the same change to event listeners set with addEventListener(), and this was an overlooked case of the scroll performance improvement on mobile.