From 70c511d94cacead428167811de79aa3436ecdd83 Mon Sep 17 00:00:00 2001 From: Craig Howell Date: Sat, 21 Oct 2023 14:06:11 -0400 Subject: [PATCH] fix(Dropdown): no longer auto highlight the first option --- src/lib/components/dropdown/Items.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/dropdown/Items.svelte b/src/lib/components/dropdown/Items.svelte index 6b593ea..488e671 100644 --- a/src/lib/components/dropdown/Items.svelte +++ b/src/lib/components/dropdown/Items.svelte @@ -16,7 +16,7 @@ let list: HTMLUListElement; // eslint-disable-next-line no-undef let items: NodeListOf | never[] = []; - let focusIndex = 0; + let focusIndex = -1; const handleClose: () => void = getContext('dropdown-handleClose'); @@ -41,7 +41,7 @@ onMount(() => { items = list.querySelectorAll('li'); - if (items && items[focusIndex]) items[focusIndex].focus(); + // if (items && items[focusIndex]) items[focusIndex].focus(); });