From 1d12a914e9a350b63f509070f0d91a178e8c4923 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Oct 2026 12:38:01 +0000 Subject: [PATCH 1/2] fix(docs): update FAQ on Chrome's scroll-to-top behavior Recent Chrome versions (153+) scroll to the top after an intercepted push/replace navigation as the Navigation API spec requires, while Safari and older Chrome versions (e.g. 141) keep the previous scroll position. Update the FAQ and the docs site comment accordingly, and note that the workaround is harmless where the spec is followed. Closes #259 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UAz1tssRXbeyChnrheXK4Z --- packages/docs/src/ClientApp.tsx | 2 +- packages/docs/src/pages/FaqPage.tsx | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/docs/src/ClientApp.tsx b/packages/docs/src/ClientApp.tsx index 48b103f..25c1ebd 100644 --- a/packages/docs/src/ClientApp.tsx +++ b/packages/docs/src/ClientApp.tsx @@ -6,7 +6,7 @@ import "./styles.css"; export function ClientApp({ routes, ssrPath }: { routes: RouteDefinition[]; ssrPath?: string }) { // Auto scroll to top - this should be handled by the browser per spec, - // but currently Chrome and Safari do not follow the spec. + // but Safari and older versions of Chrome do not follow the spec (Chrome 153+ does). useEffect(() => { const navigation = window.navigation; if (!navigation) { diff --git a/packages/docs/src/pages/FaqPage.tsx b/packages/docs/src/pages/FaqPage.tsx index 82b522d..1c195c8 100644 --- a/packages/docs/src/pages/FaqPage.tsx +++ b/packages/docs/src/pages/FaqPage.tsx @@ -14,12 +14,14 @@ export function FaqPage() {

Browser doesn't scroll to top after navigation

According to the Navigation API specification, the browser should automatically scroll to - the top of the page after a same-document navigation. However, as of now, Chrome and - Safari do not follow this part of the spec. + the top of the page after a same-document navigation. Recent versions of Chrome (153 and + later) follow this part of the spec, but Safari and older versions of Chrome (such as + Chrome 141) keep the previous scroll position instead.

As a workaround, you can listen to the navigatesuccess event and scroll to - the top manually: + the top manually. This is harmless in browsers that already follow the spec, since the + page is already at the top:

{`import { useEffect } from "react"; From 2f1b99a4ecd7214bcc119dab7238c1a8e853c9d3 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Oct 2026 12:45:18 +0000 Subject: [PATCH 2/2] fix(docs): name Chrome 149 as the version that fixed scroll-to-top Bisecting Chrome for Testing builds against the WebKit bug 304593 repro shows Chrome 148 keeps the scroll position while 149 scrolls to top. The fix is Chromium commit d6d5d3b9edd9 ("Scroll to top on navigation.scroll() to a non-existent fragment", crbug.com/479874917), first shipped in 149.0.7794.0. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UAz1tssRXbeyChnrheXK4Z --- packages/docs/src/ClientApp.tsx | 2 +- packages/docs/src/pages/FaqPage.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/docs/src/ClientApp.tsx b/packages/docs/src/ClientApp.tsx index 25c1ebd..babb2b1 100644 --- a/packages/docs/src/ClientApp.tsx +++ b/packages/docs/src/ClientApp.tsx @@ -6,7 +6,7 @@ import "./styles.css"; export function ClientApp({ routes, ssrPath }: { routes: RouteDefinition[]; ssrPath?: string }) { // Auto scroll to top - this should be handled by the browser per spec, - // but Safari and older versions of Chrome do not follow the spec (Chrome 153+ does). + // but Safari and older versions of Chrome do not follow the spec (Chrome 149+ does). useEffect(() => { const navigation = window.navigation; if (!navigation) { diff --git a/packages/docs/src/pages/FaqPage.tsx b/packages/docs/src/pages/FaqPage.tsx index 1c195c8..9b2d88c 100644 --- a/packages/docs/src/pages/FaqPage.tsx +++ b/packages/docs/src/pages/FaqPage.tsx @@ -14,9 +14,9 @@ export function FaqPage() {

Browser doesn't scroll to top after navigation

According to the Navigation API specification, the browser should automatically scroll to - the top of the page after a same-document navigation. Recent versions of Chrome (153 and - later) follow this part of the spec, but Safari and older versions of Chrome (such as - Chrome 141) keep the previous scroll position instead. + the top of the page after a same-document navigation. Chrome follows this part of the spec + since version 149, but Safari and Chrome 148 and earlier keep the previous scroll position + instead.

As a workaround, you can listen to the navigatesuccess event and scroll to