Skip to content

Commit ecfb986

Browse files
committed
svelte/SearchForm: Keep focus on search box after submitting
This makes it possible to quickly fix any typos in the search query. see https://svelte.dev/docs/kit/link-options#data-sveltekit-keepfocus
1 parent 50f06b4 commit ecfb986

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

svelte/src/lib/components/SearchForm.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
class="form"
5656
class:size-big={size === 'big'}
5757
onsubmit={search}
58+
data-sveltekit-keepfocus
5859
>
5960
<!-- Large screen input with keyboard shortcut hint -->
6061
<input

0 commit comments

Comments
 (0)