mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
fix(list-box-menu-item): use "nearest" instead of "end" when scrolling into view
This commit is contained in:
parent
a0a7ccd823
commit
09532cdf2d
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@
|
||||||
$: title = isTruncated ? ref?.innerText : undefined;
|
$: title = isTruncated ? ref?.innerText : undefined;
|
||||||
$: if (highlighted && !ref?.matches(":hover")) {
|
$: if (highlighted && !ref?.matches(":hover")) {
|
||||||
// Scroll highlighted item into view if using keyboard navigation
|
// Scroll highlighted item into view if using keyboard navigation
|
||||||
ref.scrollIntoView({ block: "end" });
|
ref.scrollIntoView({ block: "nearest" });
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue