Skip to content

Commit d0c78ef

Browse files
authored
Merge pull request #644 from 524c/master
Fix input focus issue in Select component
2 parents 1fddec4 + 42d1b90 commit d0c78ef

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
@@ -455,7 +455,7 @@
455455
function handleFocus(e) {
456456
if (focused && input === document?.activeElement) return;
457457
if (e) dispatch('focus', e);
458-
input.focus();
458+
input?.focus();
459459
focused = true;
460460
}
461461
@@ -466,7 +466,7 @@
466466
closeList();
467467
focused = false;
468468
activeValue = undefined;
469-
input.blur();
469+
input?.blur();
470470
}
471471
}
472472

0 commit comments

Comments
 (0)