Learning & Support


How to prevent horizontally sliding HTML content to navigate to previous or next page.

Twixl Support Team Updated: - Created :

    1. Problem

    HTML content with sliders or other sliding effects, trigger the go-to-next or go-to-previous article behaviour.

    2. Cause

    This is caused by a behaviour change that Apple introduced in iOS 11.3.

    From the release notes:

    Updated root document touch event listeners to use passive mode improving scrolling performance and reducing crashes.

    Source: https://developer.apple.com/library/archive/releasenotes/General/WhatsNewInSafari/Articles/Safari_11_1.html

    3. Solution

    This can be changed back to the pre-11.3 behaviour by setting the passive option on addEventListener to false.


    someElement.addEventListener("touchmove", handleTouchMove, { passive: false });

    Was this article helpful?

    0 out of 1 found this helpful