You're blocking touchmove events to contain scroll. `overscroll-behavior` does it natively.
dev.to·
Containing scroll chaining within modal overlays or sidebar drawers has historically required blocking `touchmove` JavaScript event listeners, which degrades rendering performance by forcing main-thread scroll locking. This article demonstrates how the CSS `overscroll-behavior` property (`contain` or `none`) natively isolates scroll gestures to focused containers without event listeners, preventing background page movement directly within the browser's compositor thread. Relying on platform-native web standards over heavy JavaScript event handlers is a hallmark of mature front-end and full-stack software design. Eliminating custom scroll-blocking scripts improves application responsiveness, reduces JavaScript bundle complexity, and avoids browser main-thread jank. For developers focused on overall system performance and UI quality, adopting declarative CSS properties like `overscroll-behavior` demonstrates how leveraging native browser capabilities leads to cleaner, more maintainable code bases.