Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function BaseSearchList({
},
...(!hasKeyBeenPressed.current && {setHasKeyBeenPressed}),
isFocused,
captureOnInputs: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@annaweber830 I encountered no issues when removing this line.

Could you provide a case where removing it could cause problems?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry If I removed this line, it doesn't work correctly.

Screen.Recording.2026-01-20.at.2.44.34.AM.mov

});

const renderItemWithKeyboardFocus = useCallback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ function SearchPageHeaderInput({queryJSON, searchRouterListVisible, hideSearchRo
reports={reports}
allCards={allCards}
allFeeds={allFeeds}
textInputRef={textInputRef}
/>
</View>
)}
Expand Down Expand Up @@ -476,6 +477,7 @@ function SearchPageHeaderInput({queryJSON, searchRouterListVisible, hideSearchRo
reports={reports}
allCards={allCards}
allFeeds={allFeeds}
textInputRef={textInputRef}
/>
</View>
)}
Expand Down
8 changes: 6 additions & 2 deletions src/hooks/useArrowKeyFocusManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type Config = {
onFocusedIndexChange?: (index: number) => void;
initialFocusedIndex?: number;
disabledIndexes?: readonly number[];
captureOnInputs?: boolean;
shouldExcludeTextAreaNodes?: boolean;
isActive?: boolean;
itemsPerRow?: number;
Expand Down Expand Up @@ -46,6 +47,7 @@ export default function useArrowKeyFocusManager({
// The "disabledIndexes" array needs to be stable to prevent the "useCallback" hook from being recreated unnecessarily.
// Hence the use of CONST.EMPTY_ARRAY.
disabledIndexes = CONST.EMPTY_ARRAY,
captureOnInputs = true,
shouldExcludeTextAreaNodes = true,
isActive,
itemsPerRow,
Expand All @@ -63,16 +65,18 @@ export default function useArrowKeyFocusManager({
() => ({
excludedNodes: shouldExcludeTextAreaNodes ? ['TEXTAREA'] : [],
isActive,
captureOnInputs,
}),
[isActive, shouldExcludeTextAreaNodes],
[captureOnInputs, isActive, shouldExcludeTextAreaNodes],
);

const horizontalArrowConfig = useMemo(
() => ({
excludedNodes: shouldExcludeTextAreaNodes ? ['TEXTAREA'] : [],
isActive: isActive && allowHorizontalArrowKeys,
captureOnInputs,
}),
[isActive, shouldExcludeTextAreaNodes, allowHorizontalArrowKeys],
[allowHorizontalArrowKeys, captureOnInputs, isActive, shouldExcludeTextAreaNodes],
);

useEffect(() => {
Expand Down
Loading