Page scroll locking for modals, drawers and menus: nested locks, scrollbar gap compensation, scroll position restoration and the iOS Safari workaround, for vanilla JavaScript, any framework and plain HTML.
scroll-lock typescript drawer modal scrollbar ios-safari body-scroll-lock disable-scroll samline prevent-scroll
-
Updated
Nov 20, 2026 - TypeScript