diff --git a/packages/docs/src/ClientApp.tsx b/packages/docs/src/ClientApp.tsx index 48b103f..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 currently Chrome and Safari do not follow the spec. + // 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 82b522d..9b2d88c 100644 --- a/packages/docs/src/pages/FaqPage.tsx +++ b/packages/docs/src/pages/FaqPage.tsx @@ -14,12 +14,14 @@ export function FaqPage() {
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. 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
- the top manually:
+ the top manually. This is harmless in browsers that already follow the spec, since the
+ page is already at the top: