The root scroller and how not to lose it

Polypane logo, title “The root scroller and how not to lose it”, a person sliding down an arrow, and an app demo with a dialog “Try scrolling (or dragging) the page behind this dialog.”

Kilian Valkhof explains what the page’s own scroll container gives you: it restores scroll position, answers Space and arrow keys, and on mobile collapses the address bar and enables pull-to-refresh. A fixed-height app shell wrapper with overflow replaces it, and window.scrollY stuck at 0 gives it away. Full-height layouts, sticky headers, and scroll locks all have fixes that keep the page scrolling.

polypane.app/blog/the-root-scroller-and-how-not-to-lose-it