From 55ee3bddeb61ffb4898be366552df70dadb172c7 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Mon, 4 May 2026 18:15:04 +0200 Subject: [PATCH] fix(router): skip view transition on query-only navigation The root fade overlapped smooth scrolls triggered when stackedNotes mutated, making the scroll appear to start from the snapshot's frame instead of the user's actual position. --- src/router/router.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/router/router.ts b/src/router/router.ts index 9ed87e5..c01ae51 100644 --- a/src/router/router.ts +++ b/src/router/router.ts @@ -95,8 +95,9 @@ export const router = createRouter({ routes }) -router.beforeEach(() => { +router.beforeEach((to, from) => { if (!("startViewTransition" in document)) return + if (to.path === from.path) return return new Promise((resolve) => { ;( document as Document & {