Stop closing search suggestions on input blur (#11199)
(cherry picked from commit 92ef1528bf)
This commit is contained in:
committed by
Eric Bailey
parent
6f08a0f435
commit
4d72ed73dd
@@ -474,17 +474,6 @@ export function SearchScreenShell({
|
|||||||
}
|
}
|
||||||
}, [setShowAutocomplete])
|
}, [setShowAutocomplete])
|
||||||
|
|
||||||
const onSearchInputBlur = useCallback(() => {
|
|
||||||
/*
|
|
||||||
* Bind autocomplete visibility to focus state on native. On web this
|
|
||||||
* doesn't work because of focus management, which would render the
|
|
||||||
* autocomplete results uninteractable.
|
|
||||||
*/
|
|
||||||
if (IS_NATIVE) {
|
|
||||||
setShowAutocomplete(false)
|
|
||||||
}
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
const focusSearchInput = useCallback(
|
const focusSearchInput = useCallback(
|
||||||
(tab?: TabParam) => {
|
(tab?: TabParam) => {
|
||||||
textInput.current?.focus()
|
textInput.current?.focus()
|
||||||
@@ -609,7 +598,6 @@ export function SearchScreenShell({
|
|||||||
ref={textInput}
|
ref={textInput}
|
||||||
value={searchText}
|
value={searchText}
|
||||||
onFocus={onSearchInputFocus}
|
onFocus={onSearchInputFocus}
|
||||||
onBlur={onSearchInputBlur}
|
|
||||||
onChangeText={onChangeText}
|
onChangeText={onChangeText}
|
||||||
onClearText={onPressClearQuery}
|
onClearText={onPressClearQuery}
|
||||||
onSubmitEditing={onSubmit('typed')}
|
onSubmitEditing={onSubmit('typed')}
|
||||||
|
|||||||
Reference in New Issue
Block a user