Skip to content

Commit 4146080

Browse files
authored
fix(Menu): fix type-ahead navigation while hovering (#2109)
1 parent 7ad854c commit 4146080

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/src/RovingFocus/RovingFocusGroup.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,11 @@ function handleFocus(event: FocusEvent) {
102102
if (!entryFocusEvent.defaultPrevented) {
103103
const items = getItems().map(i => i.ref).filter(i => i.dataset.disabled !== '')
104104
const activeItem = items.find(item => item.getAttribute('data-active') === '')
105+
const highlightedItem = items.find(item => item.getAttribute('data-highlighted') === '')
105106
const currentItem = items.find(
106107
item => item.id === currentTabStopId.value,
107108
)
108-
const candidateItems = [activeItem, currentItem, ...items].filter(
109+
const candidateItems = [activeItem, highlightedItem, currentItem, ...items].filter(
109110
Boolean,
110111
) as typeof items
111112
focusFirst(candidateItems, props.preventScrollOnEntryFocus)

0 commit comments

Comments
 (0)