From 0f1a1223089f89911d5c8583a9e244bafdd6e525 Mon Sep 17 00:00:00 2001 From: Tee Ming Date: Fri, 6 Jun 2025 18:10:09 +0800 Subject: [PATCH] Update client.js --- packages/kit/src/runtime/client/client.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/kit/src/runtime/client/client.js b/packages/kit/src/runtime/client/client.js index acf972621e7d..207da3dccc4f 100644 --- a/packages/kit/src/runtime/client/client.js +++ b/packages/kit/src/runtime/client/client.js @@ -2800,7 +2800,8 @@ function reset_focus() { autofocus.focus(); } else { // Reset page selection and focus - if (location.hash && document.querySelector(location.hash)) { + // TODO: find a fix that works with hash routing too + if (!app.hash && location.hash && document.querySelector(location.hash)) { const { x, y } = scroll_state(); setTimeout(() => {