From 09532cdf2d5235fdc24fa23b4bf88891f3ee1b38 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Wed, 31 Aug 2022 19:18:52 -0700 Subject: [PATCH] fix(list-box-menu-item): use "nearest" instead of "end" when scrolling into view --- src/ListBox/ListBoxMenuItem.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ListBox/ListBoxMenuItem.svelte b/src/ListBox/ListBoxMenuItem.svelte index d2318971..0679ba31 100644 --- a/src/ListBox/ListBoxMenuItem.svelte +++ b/src/ListBox/ListBoxMenuItem.svelte @@ -14,7 +14,7 @@ $: title = isTruncated ? ref?.innerText : undefined; $: if (highlighted && !ref?.matches(":hover")) { // Scroll highlighted item into view if using keyboard navigation - ref.scrollIntoView({ block: "end" }); + ref.scrollIntoView({ block: "nearest" }); }