Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit ad50097

Browse files
authored
Merge pull request #9948 from matrix-org/florianduros/fix/clear-RTE-earlier
Clear the RTE before sending a message
2 parents a63da74 + 075df4d commit ad50097

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/views/rooms/MessageComposer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,14 +336,14 @@ export class MessageComposer extends React.Component<IProps, IState> {
336336
const { permalinkCreator, relation, replyToEvent } = this.props;
337337
const composerContent = this.state.composerContent;
338338
this.setState({ composerContent: "", initialComposerContent: "" });
339+
dis.dispatch({ action: Action.ClearAndFocusSendMessageComposer });
339340
await sendMessage(composerContent, this.state.isRichTextEnabled, {
340341
mxClient: this.props.mxClient,
341342
roomContext: this.context,
342343
permalinkCreator,
343344
relation,
344345
replyToEvent,
345346
});
346-
dis.dispatch({ action: Action.ClearAndFocusSendMessageComposer });
347347
}
348348
};
349349

0 commit comments

Comments
 (0)