How do you prevent pull-to-refresh or overscroll from breaking an interaction?

Prevent an interaction from triggering page overscroll by containing the relevant scroll boundary, while preserving normal browser gestures elsewhere. The CSS overscroll-behavior property controls scroll chaining and boundary effects on a scroll container. Apply it to the smallest container that owns the interaction.
Use overscroll-behavior-y: contain when a panel should stop vertical scrolling from passing to the page after it reaches an edge. The value none also suppresses boundary effects where supported. Browser coverage differs, so the interaction must still fail safely when the property is ignored.
.chat-log {
max-height: 70dvh;
overflow-y: auto;
overscroll-behavior-y: contain;
}
.drag-surface {
touch-action: pan-y;
}
Pull-to-refresh belongs to the browser and operating system, and a site should not disable it across every page without a concrete conflict. Games, maps and drag surfaces may need stronger gesture ownership. Combine overscroll behavior with a suitable touch-action value so the browser knows which panning direction remains available.
Avoid document-wide touchmove listeners that call preventDefault. They can block scrolling, zoom and assistive gestures, and passive listeners may ignore the call. If JavaScript must handle a drag, start only after a movement threshold, use Pointer Events, capture the pointer and cancel cleanly when the browser takes over.
Test a gesture that begins near the top and bottom of the scroll container, then repeat with the page itself at its boundaries. Try slow drags, quick flicks and diagonal movement on real iOS and Android phones. The component should retain its intended gesture without trapping users inside a panel or removing familiar page navigation unnecessarily.