From 7c43029bf0dc6f520129d0a511e6932c4b43d9b8 Mon Sep 17 00:00:00 2001 From: Danish Ahmed Mirza Date: Sat, 30 Jul 2022 16:09:55 +0530 Subject: [PATCH] Fix blank keyboard on switching back from emoji keyboard --- app/containers/MessageBox/index.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/containers/MessageBox/index.tsx b/app/containers/MessageBox/index.tsx index 2c6af0dd8..6a71d05e0 100644 --- a/app/containers/MessageBox/index.tsx +++ b/app/containers/MessageBox/index.tsx @@ -958,6 +958,11 @@ class MessageBox extends Component { this.setState({ showEmojiKeyboard: false }); }; + closeEmojiKeyboardAndFocus = () => { + this.closeEmoji(); + this.focus(); + }; + closeEmojiSearchbar = () => { this.setState({ showEmojiSearchbar: false }); }; @@ -982,7 +987,7 @@ class MessageBox extends Component { this.clearInput(); this.debouncedOnChangeText.stop(); - this.closeEmoji(); + this.closeEmojiKeyboardAndFocus(); this.stopTrackingMention(); this.handleTyping(false); if (message.trim() === '' && !showSend) { @@ -1261,7 +1266,7 @@ class MessageBox extends Component { editing={editing} editCancel={this.editCancel} openEmoji={this.openEmoji} - closeEmoji={this.closeEmoji} + closeEmoji={this.closeEmojiKeyboardAndFocus} /> (this.component = component)}