Skip to content

Commit

Permalink
Merge pull request #52943 from nyomanjyotisa/issue-52128
Browse files Browse the repository at this point in the history
Fix: Inbox - Blue frame on search icon after returning from finder with device back button
  • Loading branch information
madmax330 authored Nov 27, 2024
2 parents bbfa56b + 6b36d4b commit 9ea0f51
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/Search/SearchRouter/SearchButton.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -22,14 +22,19 @@ function SearchButton({style}: SearchButtonProps) {
const theme = useTheme();
const {translate} = useLocalize();
const {openSearchRouter} = useSearchRouterContext();
const pressableRef = useRef<View>(null);

return (
<Tooltip text={translate('common.search')}>
<PressableWithoutFeedback
ref={pressableRef}
nativeID="searchButton"
accessibilityLabel={translate('common.search')}
style={[styles.flexRow, styles.touchableButtonImage, style]}
// eslint-disable-next-line react-compiler/react-compiler
onPress={Session.checkIfActionIsAllowed(() => {
pressableRef?.current?.blur();

Timing.start(CONST.TIMING.OPEN_SEARCH);
Performance.markStart(CONST.TIMING.OPEN_SEARCH);

Expand Down

0 comments on commit 9ea0f51

Please sign in to comment.