From f2281c25727acf8035a334f21a84e3658b1f0b88 Mon Sep 17 00:00:00 2001 From: Simon Mechler <170467894+Fiery-132@users.noreply.github.com> Date: Tue, 26 Nov 2024 20:13:20 +0100 Subject: [PATCH] made songbook search keep focus and scroll position (#605) --- src/lib/components/SearchBar.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/components/SearchBar.svelte b/src/lib/components/SearchBar.svelte index 8a8eee4c..2f122cb7 100644 --- a/src/lib/components/SearchBar.svelte +++ b/src/lib/components/SearchBar.svelte @@ -18,13 +18,14 @@ urlParams.delete("page"); await goto(`${i18n.route($page.url.pathname)}?${urlParams.toString()}`, { replaceState: true, + keepFocus: true, + noScroll: true, }); await tick(); setTimeout(() => { - inputField.focus(); isLoading = false; - }, 0); - }, 1000); + }, 500); + }); };