remove hack
This commit is contained in:
@@ -533,8 +533,9 @@ export function SearchScreen(
|
|||||||
scrollToTopWeb()
|
scrollToTopWeb()
|
||||||
|
|
||||||
if (inputIsFocused) {
|
if (inputIsFocused) {
|
||||||
setSearchText(queryParam)
|
|
||||||
textInput.current?.blur()
|
textInput.current?.blur()
|
||||||
|
setInputIsFocused(false)
|
||||||
|
setSearchText(queryParam)
|
||||||
} else {
|
} else {
|
||||||
navigation.setParams({q: ''})
|
navigation.setParams({q: ''})
|
||||||
}
|
}
|
||||||
@@ -658,16 +659,6 @@ export function SearchScreen(
|
|||||||
style={[pal.text, styles.headerSearchInput]}
|
style={[pal.text, styles.headerSearchInput]}
|
||||||
keyboardAppearance={theme.colorScheme}
|
keyboardAppearance={theme.colorScheme}
|
||||||
onFocus={() => setInputIsFocused(true)}
|
onFocus={() => setInputIsFocused(true)}
|
||||||
onBlur={() => {
|
|
||||||
// HACK
|
|
||||||
// give 100ms to not stop click handlers in the search history
|
|
||||||
// -prf
|
|
||||||
setTimeout(
|
|
||||||
() =>
|
|
||||||
setInputIsFocused(Boolean(textInput.current?.isFocused())),
|
|
||||||
100,
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
onChangeText={onChangeText}
|
onChangeText={onChangeText}
|
||||||
onSubmitEditing={onSubmit}
|
onSubmitEditing={onSubmit}
|
||||||
autoFocus={false}
|
autoFocus={false}
|
||||||
|
|||||||
Reference in New Issue
Block a user