Skip to content

Commit f977625

Browse files
fix focus
1 parent af30c42 commit f977625

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/routes/+page.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,10 @@
202202
/>
203203
<button
204204
class="ml-2 px-3 bg-gray-200 hover:bg-gray-300 border border-gray-700 rounded-md text-lg shadow-sm"
205-
on:click={() => onSubmit(inputEl.value)}>Submit</button
205+
on:click={(e) => {
206+
inputEl.focus();
207+
onSubmit(inputEl.value);
208+
}}>Submit</button
206209
>
207210
</div>
208211
<span class="inline-block mt-1 mb-10 text-gray-700 text-sm">

0 commit comments

Comments
 (0)