Merge pull request #9948 from matrix-org/florianduros/fix/clear-RTE-earlier

Clear the RTE before sending a message
pull/28217/head
Florian Duros 2023-01-20 11:21:39 +01:00 committed by GitHub
commit ad500973f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -336,6 +336,7 @@ export class MessageComposer extends React.Component<IProps, IState> {
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<IProps, IState> {
relation,
replyToEvent,
});
dis.dispatch({ action: Action.ClearAndFocusSendMessageComposer });
}
};