blockScrollStrategy

Commons
stable

Prevent page scrolling while an overlay is open. Adds the origam-overlay--scroll-blocked class to all scroll parents, captures their current scroll positions as CSS custom properties, and restores everything on scope disposal.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

data
requis
IScrollStrategyData
Context object carrying reactive refs for the overlay root, target element, and content element, plus an updateLocation callback.
props
requis
IScrollStrategyProps
Strategy configuration, notably the contained flag that restricts scroll-parent collection to within the offset parent rather than the full ancestor chain.

API

Valeur de retour

La valeur retournée par cet util.

No return value. Cleanup (restoring scroll positions and removing classes) runs automatically on onScopeDispose.

Usage

Exemples

Extraits de code prêts à coller.

Use inside an overlay composable

typescript