diff --git a/native/chat/chat-input-bar.react.js b/native/chat/chat-input-bar.react.js --- a/native/chat/chat-input-bar.react.js +++ b/native/chat/chat-input-bar.react.js @@ -628,20 +628,35 @@ }); }, 400); - focusAndUpdateText = (text: string) => { - const { textInput } = this; - if (!textInput) { - return; - } + focusAndUpdateTextAndSelection = (text: string, selection: Selection) => { + this.setState({ + text, + textEdited: true, + selection, + }); + this.saveDraft(text); + + this.focusAndUpdateButtonsVisibility(); + }; + focusAndUpdateText = (text: string) => { const currentText = this.state.text; if (!currentText.startsWith(text)) { const prependedText = text.concat(currentText); this.updateText(prependedText); - this.immediatelyShowSendButton(); - this.immediatelyHideButtons(); } + this.focusAndUpdateButtonsVisibility(); + }; + + focusAndUpdateButtonsVisibility = () => { + const { textInput } = this; + if (!textInput) { + return; + } + + this.immediatelyShowSendButton(); + this.immediatelyHideButtons(); textInput.focus(); };