From e9de1ec19f4dde83a8a1b1659b89782fd9f5e485 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 9 May 2026 16:35:53 +0000 Subject: [PATCH] fix: prevent white background flash and overscroll on Safari iOS - Set background-color: #101010 on html/body/.App so the Safari iOS rubber-band overscroll area is dark instead of white - Always render body background style in ViewLoader (not just during Suspense fallback) so keyColour param and --background-color-override propagate to the body for the overscroll region - Add viewport-fit=cover, apple-mobile-web-app meta tags for proper iOS notch/safe-area handling - Fix manifest.json background_color from #ffffff to #101010 - Align theme_color across both manifests to #101010 https://claude.ai/code/session_016z5vU45pexTdkQV2eHJqh4 --- apps/client/index.html | 4 +++- apps/client/public/manifest.json | 4 ++-- apps/client/public/site.webmanifest | 2 +- apps/client/src/index.scss | 2 ++ apps/client/src/views/ViewLoader.tsx | 6 +++++- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/apps/client/index.html b/apps/client/index.html index 7053111d3..99f1745de 100644 --- a/apps/client/index.html +++ b/apps/client/index.html @@ -4,8 +4,10 @@ - + + + diff --git a/apps/client/public/manifest.json b/apps/client/public/manifest.json index 44d458dd5..0fe37d7c5 100644 --- a/apps/client/public/manifest.json +++ b/apps/client/public/manifest.json @@ -14,6 +14,6 @@ "scope": "./", "start_url": "./", "display": "", - "theme_color": "#121212", - "background_color": "#ffffff" + "theme_color": "#101010", + "background_color": "#101010" } diff --git a/apps/client/public/site.webmanifest b/apps/client/public/site.webmanifest index 88ea7c3b1..a0dbed0df 100644 --- a/apps/client/public/site.webmanifest +++ b/apps/client/public/site.webmanifest @@ -2,7 +2,7 @@ "name": "", "short_name": "", "icons": [{ "src": "ontime-logo.png", "sizes": "295x295", "type": "image/png" }], - "theme_color": "#2B5ABC", + "theme_color": "#101010", "background_color": "#101010", "display": "standalone" } diff --git a/apps/client/src/index.scss b/apps/client/src/index.scss index 3a719f98d..8a0d4f78b 100644 --- a/apps/client/src/index.scss +++ b/apps/client/src/index.scss @@ -81,6 +81,8 @@ html, user-select: none; -webkit-app-region: drag; isolation: isolate; + // prevents Safari iOS from showing white in the overscroll (rubber-band) area + background-color: $ui-black; } // reset button styles diff --git a/apps/client/src/views/ViewLoader.tsx b/apps/client/src/views/ViewLoader.tsx index 6743492d9..a772b7d53 100644 --- a/apps/client/src/views/ViewLoader.tsx +++ b/apps/client/src/views/ViewLoader.tsx @@ -23,15 +23,19 @@ export default function ViewLoader({ children }: PropsWithChildren) { const searchParams = new URLSearchParams(window.location.search); const colourFromParams = searchParams.get('keyColour') ?? '#101010'; + // always keep body background in sync so Safari iOS overscroll area matches the view + const bodyBgStyle = `body { background-color: var(--background-color-override, ${colourFromParams}); }`; + return ( - + } > + {children}