Fix blank keyboard on switching back from emoji keyboard

This commit is contained in:
Danish Ahmed Mirza 2022-07-30 16:09:55 +05:30 committed by Danish
parent 37ac131618
commit 7c43029bf0
1 changed files with 7 additions and 2 deletions

View File

@ -958,6 +958,11 @@ class MessageBox extends Component<IMessageBoxProps, IMessageBoxState> {
this.setState({ showEmojiKeyboard: false }); this.setState({ showEmojiKeyboard: false });
}; };
closeEmojiKeyboardAndFocus = () => {
this.closeEmoji();
this.focus();
};
closeEmojiSearchbar = () => { closeEmojiSearchbar = () => {
this.setState({ showEmojiSearchbar: false }); this.setState({ showEmojiSearchbar: false });
}; };
@ -982,7 +987,7 @@ class MessageBox extends Component<IMessageBoxProps, IMessageBoxState> {
this.clearInput(); this.clearInput();
this.debouncedOnChangeText.stop(); this.debouncedOnChangeText.stop();
this.closeEmoji(); this.closeEmojiKeyboardAndFocus();
this.stopTrackingMention(); this.stopTrackingMention();
this.handleTyping(false); this.handleTyping(false);
if (message.trim() === '' && !showSend) { if (message.trim() === '' && !showSend) {
@ -1261,7 +1266,7 @@ class MessageBox extends Component<IMessageBoxProps, IMessageBoxState> {
editing={editing} editing={editing}
editCancel={this.editCancel} editCancel={this.editCancel}
openEmoji={this.openEmoji} openEmoji={this.openEmoji}
closeEmoji={this.closeEmoji} closeEmoji={this.closeEmojiKeyboardAndFocus}
/> />
<TextInput <TextInput
ref={component => (this.component = component)} ref={component => (this.component = component)}