Even pinch-to-zoom behaves sanely with this non-js setup. Scroll me up and down, even while already resting at scroll boundaries and see me never chain scrolling up to the viewport. If you scroll horizontally, you'll see the trick is that this vertical scroller is nested in a horizontal scroller that just barely overflows and has offsets around a sticky positioning scheme that provides this eventual vertical scroll container. Can use vertical alignment for modal content, like shown, or even sticky headers and footers inside. Always keep in mind on screen form controls when using scrolling modals and not using the visual viewport (scrollingElement) has interop issues.