Skip to content

Commit

Permalink
Merge pull request #38978 from nkdengineer/fix/38700
Browse files Browse the repository at this point in the history
Fix can not focus on the main composer after going back from thread
  • Loading branch information
NikkiWines authored Mar 27, 2024
2 parents b27be0f + 240e394 commit f8416e9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,9 @@ function ComposerWithSuggestions(
const unsubscribeNavigationBlur = navigation.addListener('blur', () => KeyDownListener.removeKeyDownPressListener(focusComposerOnKeyPress));
const unsubscribeNavigationFocus = navigation.addListener('focus', () => {
KeyDownListener.addKeyDownPressListener(focusComposerOnKeyPress);
// The report isn't unmounted and can be focused again after going back from another report so we should update the composerRef again
// @ts-expect-error need to reassign this ref
ReportActionComposeFocusManager.composerRef.current = textInputRef.current;
setUpComposeFocusManager();
});
KeyDownListener.addKeyDownPressListener(focusComposerOnKeyPress);
Expand Down

0 comments on commit f8416e9

Please sign in to comment.