mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
fix(list-box-menu-item): do not scroll entire page when using keyboard navigation (#1474)
This commit is contained in:
parent
a0a7ccd823
commit
edf33ca2d2
1 changed files with 1 additions and 1 deletions
|
@ -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" });
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue