Skip to content

Commit da93c0c

Browse files
committed
Autofocus the input bar, close #7
1 parent f26a5df commit da93c0c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/routes/+page.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
style="resize:none"
5555
spellcheck="false"
5656
placeholder="Search rust things instantly!"
57+
autofocus
5758
/>
5859
<div class="omn-clear">
5960
<svg

src/routes/crates/+page.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,10 @@
140140
<div
141141
class="m-8 mb-16 flex flex-col items-center md:flex-row md:justify-center md:items-center"
142142
>
143+
<!-- svelte-ignore a11y-autofocus -->
143144
<input
144145
bind:value={searchCrate}
146+
autofocus
145147
type="text"
146148
class="w-full md:w-[400px] h-8 px-2 py-0 rounded border border-solid border-[#f9bb2daa] focus:outline-none"
147149
/>

0 commit comments

Comments
 (0)