From 72a503108387874d81a42fa909d3fbc530b3172f Mon Sep 17 00:00:00 2001 From: Srikar Parsi <48188732+srikarparsi@users.noreply.github.com> Date: Thu, 17 Oct 2024 20:21:25 -0400 Subject: [PATCH] Merge pull request #51064 from abzokhattab/fix-android-focus-in-search-router-input Fix android input focus in the search router component (cherry picked from commit f180cbb97f7158ee6339215c9d5313b50f232c8c) (CP triggered by marcaaron) --- src/components/Search/SearchRouter/SearchRouterInput.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Search/SearchRouter/SearchRouterInput.tsx b/src/components/Search/SearchRouter/SearchRouterInput.tsx index ebff95eb3a5a..811c34b72a6e 100644 --- a/src/components/Search/SearchRouter/SearchRouterInput.tsx +++ b/src/components/Search/SearchRouter/SearchRouterInput.tsx @@ -1,13 +1,14 @@ -import React, {useState} from 'react'; import type {ReactNode, RefObject} from 'react'; -import {View} from 'react-native'; +import React, {useState} from 'react'; import type {StyleProp, ViewStyle} from 'react-native'; +import {View} from 'react-native'; import FormHelpMessage from '@components/FormHelpMessage'; import type {SelectionListHandle} from '@components/SelectionList/types'; import TextInput from '@components/TextInput'; import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useThemeStyles from '@hooks/useThemeStyles'; +import shouldDelayFocus from '@libs/shouldDelayFocus'; import variables from '@styles/variables'; import CONST from '@src/CONST'; @@ -93,6 +94,7 @@ function SearchRouterInput({ value={value} onChangeText={onChangeText} autoFocus={autoFocus} + shouldDelayFocus={shouldDelayFocus} loadingSpinnerStyle={[styles.mt0, styles.mr2]} role={CONST.ROLE.PRESENTATION} placeholder={translate('search.searchPlaceholder')}