From 506523efce2fe974c3cb205bf02811b7e26e46fe Mon Sep 17 00:00:00 2001 From: Rob Snow Date: Thu, 2 Jul 2026 07:39:08 +1000 Subject: [PATCH 1/2] fix: table press and hold navigation --- packages/react-aria/src/selection/useSelectableCollection.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-aria/src/selection/useSelectableCollection.ts b/packages/react-aria/src/selection/useSelectableCollection.ts index 3b3bb8413db..44e2ee18437 100644 --- a/packages/react-aria/src/selection/useSelectableCollection.ts +++ b/packages/react-aria/src/selection/useSelectableCollection.ts @@ -429,7 +429,8 @@ export function useSelectableCollection( Escape: escape, Tab: tab, 'Tab+Shift': shiftTab - } + }, + allowRepeats: true }); // oxlint-enable react/react-compiler From 8610f4614793b7578f00adba864e2b0f37c43868 Mon Sep 17 00:00:00 2001 From: Rob Snow Date: Thu, 2 Jul 2026 07:43:24 +1000 Subject: [PATCH 2/2] divide up repeats allowed vs not --- .../src/selection/useSelectableCollection.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/react-aria/src/selection/useSelectableCollection.ts b/packages/react-aria/src/selection/useSelectableCollection.ts index 44e2ee18437..a97b8ddf02a 100644 --- a/packages/react-aria/src/selection/useSelectableCollection.ts +++ b/packages/react-aria/src/selection/useSelectableCollection.ts @@ -415,22 +415,27 @@ export function useSelectableCollection( }; }; // oxlint-disable react/react-compiler - let {keyboardProps} = useKeyboard({ + let {keyboardProps: repeatKeyboardProps} = useKeyboard({ shortcuts: { ...withShiftSel('ArrowDown', arrowDown), ...withShiftSel('ArrowUp', arrowUp), ...withShiftSel('ArrowLeft', arrowLeft), ...withShiftSel('ArrowRight', arrowRight), + ...withShiftSel('PageDown', pageDown), + ...withShiftSel('PageUp', pageUp) + }, + allowRepeats: true + }); + // oxlint-disable react/react-compiler + let {keyboardProps} = useKeyboard({ + shortcuts: { ...withShiftSel('Home', home), ...withShiftSel('End', end), - ...withShiftSel('PageDown', pageDown), - ...withShiftSel('PageUp', pageUp), 'Mod+A': aHandler, Escape: escape, Tab: tab, 'Tab+Shift': shiftTab - }, - allowRepeats: true + } }); // oxlint-enable react/react-compiler @@ -699,7 +704,7 @@ export function useSelectableCollection( }); let handlers = { - ...keyboardProps, + ...mergeProps(keyboardProps, repeatKeyboardProps), onFocus, onBlur, onMouseDown(e) {