Search code examples
javascriptjqueryioscssjquery-mobile

JQuery mobile IOS device how to remove default scroll on web


I am having issues with the default "refresh" scrollbar in IOS. I have created my own scrollbar in a div and i cant seem to access it without using the default scrollbar in IOS. I have fixed the problem on both web and android but i cant seem to figure out how to remove the "default" scrollbar on IOS devices (phone and Ipad).


Solution

  • To prevent user from scrolling the screen you need to redefine touch move event

    document.addEventListener('touchmove', function(e) {
       e.preventDefault();
    }, { passive: false });