Skip to content

Commit

Permalink
fix(Dropdown): no longer auto highlight the first option
Browse files Browse the repository at this point in the history
  • Loading branch information
N00nDay committed Oct 21, 2023
1 parent 7e8445b commit 70c511d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/components/dropdown/Items.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
let list: HTMLUListElement;
// eslint-disable-next-line no-undef
let items: NodeListOf<HTMLLIElement> | never[] = [];
let focusIndex = 0;
let focusIndex = -1;
const handleClose: () => void = getContext('dropdown-handleClose');
Expand All @@ -41,7 +41,7 @@
onMount(() => {
items = list.querySelectorAll('li');
if (items && items[focusIndex]) items[focusIndex].focus();
// if (items && items[focusIndex]) items[focusIndex].focus();
});
</script>

Expand Down

0 comments on commit 70c511d

Please sign in to comment.