From 0db124cf8d52041623969eaf9cc2020b899fa883 Mon Sep 17 00:00:00 2001 From: Zuzanna Furtak Date: Mon, 9 Feb 2026 11:06:10 +0100 Subject: [PATCH] Fix enter behaviour --- .../BaseSelectionListWithSections.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/SelectionList/SelectionListWithSections/BaseSelectionListWithSections.tsx b/src/components/SelectionList/SelectionListWithSections/BaseSelectionListWithSections.tsx index 3237d0760fb8..4dd78cbe0a71 100644 --- a/src/components/SelectionList/SelectionListWithSections/BaseSelectionListWithSections.tsx +++ b/src/components/SelectionList/SelectionListWithSections/BaseSelectionListWithSections.tsx @@ -186,7 +186,7 @@ function BaseSelectionListWithSections({ useKeyboardShortcut(CONST.KEYBOARD_SHORTCUTS.ENTER, selectFocusedItem, { captureOnInputs: true, - shouldBubble: !getFocusedItem(), + shouldBubble: itemsCount > 0 && !getFocusedItem(), shouldStopPropagation, isActive: !disableKeyboardShortcuts && isScreenFocused && focusedIndex >= 0 && !disableEnterShortcut, }); @@ -203,7 +203,7 @@ function BaseSelectionListWithSections({ }, { captureOnInputs: true, - shouldBubble: !getFocusedItem(), + shouldBubble: itemsCount > 0 && !getFocusedItem(), isActive: !disableKeyboardShortcuts && isScreenFocused && !confirmButtonOptions?.isDisabled, }, );