Skip to content

Commit eaecb96

Browse files
authored
fix: roving tabindex in useSelectableCollection for virtualized collections (#9582)
1 parent 4955eb2 commit eaecb96

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/@react-aria/selection/src/useSelectableCollection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ export function useSelectableCollection(options: AriaSelectableCollectionOptions
580580
// This will be marshalled to either the first or last item depending on where focus came from.
581581
let tabIndex: number | undefined = undefined;
582582
if (!shouldUseVirtualFocus) {
583-
tabIndex = manager.isFocused ? -1 : 0;
583+
tabIndex = manager.focusedKey == null ? 0 : -1;
584584
}
585585

586586
let collectionId = useCollectionId(manager.collection);

0 commit comments

Comments
 (0)