From ae6f897c3df738107aedf85290bfa37c1458a478 Mon Sep 17 00:00:00 2001 From: Eskalifer1 Date: Tue, 6 Jan 2026 21:41:49 +0200 Subject: [PATCH] fix:78593: Web - Expense - Pressing Enter on no result page proceeds to next page instead of blocking it --- .../SelectionListWithSections/BaseSelectionListWithSections.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SelectionListWithSections/BaseSelectionListWithSections.tsx b/src/components/SelectionListWithSections/BaseSelectionListWithSections.tsx index 1bccd9a5d0e1f..7eb2b96aaaa91 100644 --- a/src/components/SelectionListWithSections/BaseSelectionListWithSections.tsx +++ b/src/components/SelectionListWithSections/BaseSelectionListWithSections.tsx @@ -971,7 +971,7 @@ function BaseSelectionListWithSections({ /** Selects row when pressing Enter */ useKeyboardShortcut(CONST.KEYBOARD_SHORTCUTS.ENTER, selectFocusedOption, { captureOnInputs: true, - shouldBubble: !flattenedSections.allOptions.at(focusedIndex) || focusedIndex === -1, + shouldBubble: (flattenedSections.allOptions.length > 0 && !flattenedSections.allOptions.at(focusedIndex)) || focusedIndex === -1, shouldStopPropagation, shouldPreventDefault, isActive: !disableKeyboardShortcuts && !disableEnterShortcut && isFocused && focusedIndex >= 0,