Skip to content

Commit 75f2ca0

Browse files
committed
chore: remove input auto focus on_mount
1 parent a87d5db commit 75f2ca0

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/routes/icons/+page.svelte

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script lang="ts">
22
import { given_icon_name_return_html_string } from "$lib/utils/icons";
33
import { bigram_search, linear_search } from "$lib/utils/search";
4-
import { onMount } from "svelte";
54
import { toasts_store } from "$lib/components/ui/toast/toast.svelte";
65
import { browser } from "$app/environment";
76
import Header from "$lib/components/header.svelte";
@@ -10,7 +9,6 @@
109
1110
let icons_json = $state<Icon[] | null>(null);
1211
let icons = $state<Icon[] | null>(null);
13-
let search_input_el = $state<HTMLInputElement | null>(null);
1412
1513
$effect.pre(() => {
1614
import("$lib/icons.json", {
@@ -23,10 +21,6 @@
2321
});
2422
});
2523
26-
onMount(() => {
27-
search_input_el?.focus();
28-
});
29-
3024
function handle_input(event: Event) {
3125
if (icons_json == null) return;
3226
@@ -80,12 +74,11 @@
8074
<div class="search-container">
8175
<coreicons-shape-search class="icon"></coreicons-shape-search>
8276
<input
77+
placeholder="Search icons..."
8378
oninput={(event) => {
8479
event.preventDefault();
8580
handle_input(event);
8681
}}
87-
placeholder="Search icons..."
88-
bind:this={search_input_el}
8982
/>
9083
</div>
9184
<div class="icons-grid-container">

0 commit comments

Comments
 (0)