Skip to content

Commit 9ea0f51

Browse files
authored
Merge pull request #52943 from nyomanjyotisa/issue-52128
Fix: Inbox - Blue frame on search icon after returning from finder with device back button
2 parents bbfa56b + 6b36d4b commit 9ea0f51

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Diff for: src/components/Search/SearchRouter/SearchButton.tsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React from 'react';
2-
import type {StyleProp, ViewStyle} from 'react-native';
1+
import React, {useRef} from 'react';
2+
import type {StyleProp, View, ViewStyle} from 'react-native';
33
import Icon from '@components/Icon';
44
import * as Expensicons from '@components/Icon/Expensicons';
55
import {PressableWithoutFeedback} from '@components/Pressable';
@@ -22,14 +22,19 @@ function SearchButton({style}: SearchButtonProps) {
2222
const theme = useTheme();
2323
const {translate} = useLocalize();
2424
const {openSearchRouter} = useSearchRouterContext();
25+
const pressableRef = useRef<View>(null);
2526

2627
return (
2728
<Tooltip text={translate('common.search')}>
2829
<PressableWithoutFeedback
30+
ref={pressableRef}
2931
nativeID="searchButton"
3032
accessibilityLabel={translate('common.search')}
3133
style={[styles.flexRow, styles.touchableButtonImage, style]}
34+
// eslint-disable-next-line react-compiler/react-compiler
3235
onPress={Session.checkIfActionIsAllowed(() => {
36+
pressableRef?.current?.blur();
37+
3338
Timing.start(CONST.TIMING.OPEN_SEARCH);
3439
Performance.markStart(CONST.TIMING.OPEN_SEARCH);
3540

0 commit comments

Comments
 (0)