Skip to content

Commit

Permalink
Merge pull request #54651 from christianwen/fix/54629
Browse files Browse the repository at this point in the history
Composer is blocked by keyboard after changing payment method or backgrounding app

(cherry picked from commit 5555a42)

(CP triggered by Beamanator)
  • Loading branch information
Beamanator authored and OSBotify committed Dec 30, 2024
1 parent 016227c commit c2d9488
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,13 @@ function ComposerWithSuggestions(
focus(true);
}, [focus, prevIsFocused, editFocused, prevIsModalVisible, isFocused, modal?.isVisible, isNextModalWillOpenRef, shouldAutoFocus]);

useEffect(() => {
if (prevIsFocused || !isFocused || showSoftInputOnFocus) {
return;
}
setShowSoftInputOnFocus(true);
}, [isFocused, prevIsFocused, showSoftInputOnFocus, setShowSoftInputOnFocus]);

useEffect(() => {
// Scrolls the composer to the bottom and sets the selection to the end, so that longer drafts are easier to edit
updateMultilineInputRange(textInputRef.current, !!shouldAutoFocus);
Expand Down

0 comments on commit c2d9488

Please sign in to comment.