Events for inertial scrolling on mobile safari

I am currently using overflow: we are scrolling a web page optimized for iPad and it works great. I began to experience problems with touch events in a scrollable div because he interpreted scroll bends as touches. Since there is no scroll completion event, and the scroll event fires every time I scroll, I tried to detect the scroll event and set a timer to temporarily disable the touch event. However, I found that the scroll event is fired only every time the user triggers a scroll, which is rarely with inertial scrolling.

Is there a scroll event with constant firing, or is there any other way to detect scroll at the moment?

This is only a problem with inertial scrolling on Mobile Safari, because when you move the mouse on OS X, inertial scrolling automatically stops, therefore, to trigger a click event, you usually need to move the mouse to avoid conflict. You also don’t have two-way touch input for scrolling and touching to click.

+5
source share
1 answer
<script type="text/javascript">
<!--
    document.addEventListener("touchmove", ScrollStart, false);
    document.addEventListener("scroll", Scroll, false);
    function ScrollStart() {
        //start of scroll event for iOS
    }
    function Scroll() {
        //end of scroll event for iOS
        //and
        //start/end of scroll event for other browsers
    }   
// -->
</script>
+3
source

All Articles