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.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- datarequisIScrollStrategyData
- Context object carrying reactive refs for the overlay root, target element, and content element, plus an updateLocation callback.
- propsrequisIScrollStrategyProps
- 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