Skip to content

Commit 42d1b90

Browse files
committed
Fix input focus issue in Select component
1 parent c13e6a4 commit 42d1b90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/Select.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@
454454
function handleFocus(e) {
455455
if (focused && input === document?.activeElement) return;
456456
if (e) dispatch('focus', e);
457-
input.focus();
457+
input?.focus();
458458
focused = true;
459459
}
460460
@@ -465,7 +465,7 @@
465465
closeList();
466466
focused = false;
467467
activeValue = undefined;
468-
input.blur();
468+
input?.blur();
469469
}
470470
}
471471

0 commit comments

Comments
 (0)