T45c Site · Home: full screen locks the page's overflow and Lenis halts on it, ending a glide in flight

This commit is contained in:
ZacharyZhang-NY committed 2026-10-01 08:38:05 -04:00
1 parent 03f40c4b86
commit d7dbcfbb18
2 files changed
+5 -4

No files matched your search

+2 -1
View File
@@ -61,7 +61,8 @@ export function Shell() {
const router = useRouter();
useEffect(() => {
if (still) return;
const lenis = new Lenis({ autoRaf: true });
// It halts while the page's overflow is hidden, as full screen sets.
const lenis = new Lenis({ autoRaf: true, autoToggle: true });
// A glide in flight must not outlive its page.
const off = router.subscribe("onBeforeNavigate", () => lenis.scrollTo(lenis.animatedScroll, { immediate: true, force: true }));
return () => {