Closed carltesta closed 4 years ago
window.onload
expects to be assigned a function, you could try
window.onload = function() {
bodyScrollLock.disableBodyScroll(targetElement);
}
instead
Thanks, I tried this but then the body scroll lock doesn't work on either Desktop or mobile.
I got 3 devices.
@diachedelic solution doesn't work as well.
@awhwebteam please provide the example of code you're using. https://output.jsbin.com/goxirebemi I checked this on iOS 13 and iOS 12 – it works fine.
I'm using Body-Scroll-Lock in a simple webpage. I want to mimic the feel of an app on iOS but I cannot disable the momentum scrolling. The following works on Desktop (Chrome), but doesn't work on iOS safari. What am I missing? The "#main" element is the class of the body tag in the HTML.