How to suppress "pull to refresh" in iOS 15

"Pull to refresh" is suppressed by the following javascript source.

$(window).on('touchstart', function (e) {
    startY = e.originalEvent.changedTouches[0].pageY;
});

.
.
.

if(useEventListener) {
    window.addEventListener("touchmove", function(e){
        var currentY = e.changedTouches[0].pageY;
         if ($(window).scrollTop() <= 0 && startY <= currentY) {
             e.preventDefault();
             return false;
         }
    },{passive:false});
}

The above method is used to prevent swiping from the top of the screen. You can suppress swiping while you are at the top of the screen, Swipe suppression cannot be performed if you are not at the top of the screen.

  • Swipe cannot be suppressed even if "e.preventDefault ()" is called in the middle of "touch move".

I would like to know how to suppress even if you swipe from other than the top.

  • Is there anyone who can answer this inquiry? Please confirm.

Add a Comment

Accepted Reply

Is there anyone who can answer this inquiry? Please confirm.

Replies

Is there anyone who can answer this inquiry? Please confirm.