From 91072548d40baecaa77e7dc5c8ea0e71c4852b51 Mon Sep 17 00:00:00 2001 From: BOHA Date: Thu, 11 Jun 2026 09:37:55 +0200 Subject: [PATCH] fix(odin): disable pull-to-refresh on the immersive mobile page A PTR reload lands while the standalone-PWA viewport is still settling and re-races the --app-height measurement (Chromium settles without firing resize), bringing the scroll room back ~50% of the time. The immersive page is fixed-viewport, so overscroll-behavior-y: none on html+body removes the gesture (and the race trigger) entirely; restored on route leave. Co-Authored-By: Claude Fable 5 --- src/admin/ui/AppShell.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/admin/ui/AppShell.tsx b/src/admin/ui/AppShell.tsx index f1e7f5a..bdcc533 100644 --- a/src/admin/ui/AppShell.tsx +++ b/src/admin/ui/AppShell.tsx @@ -42,10 +42,19 @@ export default function AppShell() { set(); window.addEventListener("resize", set); window.visualViewport?.addEventListener("resize", set); + // Kill pull-to-refresh: a PTR reload lands mid-viewport-settle and + // re-races the measurement (Chromium settles without a resize event). + // The immersive page is fixed-viewport — the gesture has no use here. + const prevRootOverscroll = root.style.overscrollBehaviorY; + const prevBodyOverscroll = document.body.style.overscrollBehaviorY; + root.style.overscrollBehaviorY = "none"; + document.body.style.overscrollBehaviorY = "none"; return () => { window.removeEventListener("resize", set); window.visualViewport?.removeEventListener("resize", set); root.style.removeProperty("--app-height"); + root.style.overscrollBehaviorY = prevRootOverscroll; + document.body.style.overscrollBehaviorY = prevBodyOverscroll; }; }, [immersiveOnMobile]);