Hold cookie banner scroll lock against smooth scrollers
The preference panel scroll lock relied on `overflow: hidden` on the document element, which JS-driven smooth-scroll libraries such as Lenis (used by Framer, e.g. getbluejay.ai) bypass entirely since they intercept wheel/touch events and scroll programmatically. Pin the body with `position: fixed` (saving and restoring the scroll position) so the viewport has no scroll distance left to animate, even for libraries that capture wheel events on the window before us. Keep capture-phase wheel/touch cancellation as defense-in-depth for sites that scroll an inner container, while still letting the panel's own list scroll. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -4,6 +4,10 @@ All notable changes to the `@probo/cookie-banner` SDK will be documented in this
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Fixed
|
||||
|
||||
- Hold the page scroll lock on sites using JS-driven smooth-scroll libraries (e.g. Lenis, as used by Framer) that bypass `overflow: hidden`. The body is now pinned with `position: fixed` (scroll position saved and restored) to remove the viewport's scroll distance entirely, with capture-phase wheel/touch cancellation as defense-in-depth for inner scroll containers; the preference panel's own list can still scroll
|
||||
|
||||
## [0.9.2] - 2026-06-11
|
||||
|
||||
### Changed
|
||||
|
||||
Reference in New Issue
Block a user