Skip to content

Commit 0bb53b4

Browse files
committed
don't refocus after coming from bg
1 parent 9ae7d3f commit 0bb53b4

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type {
1111
TextInputKeyPressEventData,
1212
TextInputScrollEventData,
1313
} from 'react-native';
14-
import {AppState, DeviceEventEmitter, findNodeHandle, InteractionManager, Keyboard, NativeModules, View} from 'react-native';
14+
import {DeviceEventEmitter, findNodeHandle, InteractionManager, NativeModules, View} from 'react-native';
1515
import {useFocusedInputHandler} from 'react-native-keyboard-controller';
1616
import type {OnyxEntry} from 'react-native-onyx';
1717
import {useOnyx} from 'react-native-onyx';
@@ -734,21 +734,6 @@ function ComposerWithSuggestions(
734734
tag.set(findNodeHandle(textInputRef.current) ?? -1);
735735
}, [tag]);
736736

737-
useEffect(() => {
738-
const appStateSubscription = AppState.addEventListener('change', (nextAppState) => {
739-
if (!nextAppState.match(/inactive|background/)) {
740-
focus(true);
741-
return;
742-
}
743-
744-
Keyboard.dismiss();
745-
});
746-
747-
return () => {
748-
appStateSubscription.remove();
749-
};
750-
}, [focus]);
751-
752737
useFocusedInputHandler(
753738
{
754739
onSelectionChange: (event) => {

0 commit comments

Comments
 (0)