diff --git a/src/components/Search/SearchRouter/SearchButton.tsx b/src/components/Search/SearchRouter/SearchButton.tsx index 90699e951998..e69a11c30da2 100644 --- a/src/components/Search/SearchRouter/SearchButton.tsx +++ b/src/components/Search/SearchRouter/SearchButton.tsx @@ -1,5 +1,5 @@ -import React from 'react'; -import type {StyleProp, ViewStyle} from 'react-native'; +import React, {useRef} from 'react'; +import type {StyleProp, View, ViewStyle} from 'react-native'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; import {PressableWithoutFeedback} from '@components/Pressable'; @@ -22,14 +22,19 @@ function SearchButton({style}: SearchButtonProps) { const theme = useTheme(); const {translate} = useLocalize(); const {openSearchRouter} = useSearchRouterContext(); + const pressableRef = useRef(null); return ( { + pressableRef?.current?.blur(); + Timing.start(CONST.TIMING.OPEN_SEARCH); Performance.markStart(CONST.TIMING.OPEN_SEARCH);