From 075df4d1b3a6c2fc2966f16d2752529749f672a1 Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Fri, 20 Jan 2023 10:42:25 +0100 Subject: [PATCH] Call Action.ClearAndFocusSendMessageComposer before sending a message --- src/components/views/rooms/MessageComposer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/rooms/MessageComposer.tsx b/src/components/views/rooms/MessageComposer.tsx index f2a6e963f7..2d5f9cc99c 100644 --- a/src/components/views/rooms/MessageComposer.tsx +++ b/src/components/views/rooms/MessageComposer.tsx @@ -336,6 +336,7 @@ export class MessageComposer extends React.Component { const { permalinkCreator, relation, replyToEvent } = this.props; const composerContent = this.state.composerContent; this.setState({ composerContent: "", initialComposerContent: "" }); + dis.dispatch({ action: Action.ClearAndFocusSendMessageComposer }); await sendMessage(composerContent, this.state.isRichTextEnabled, { mxClient: this.props.mxClient, roomContext: this.context, @@ -343,7 +344,6 @@ export class MessageComposer extends React.Component { relation, replyToEvent, }); - dis.dispatch({ action: Action.ClearAndFocusSendMessageComposer }); } };