I am creating a web app for iPads. For that I would like to prevent overscrolling on the top of the page.
The closest solution I've found was this: iOS Safari – How to disable overscroll but allow scrollable divs to scroll normally?
But I seem to have a little bit more difficult case.
The snippet basically disables all scrolling except for .scrollable
elements. I need it to only block scrolling upwards, if the top of the page is hit, and only prevent scrolling on the body.