mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 03:36:07 +03:00
Call Action.ClearAndFocusSendMessageComposer before sending a message
This commit is contained in:
parent
a63da74f06
commit
075df4d1b3
1 changed files with 1 additions and 1 deletions
|
@ -336,6 +336,7 @@ export class MessageComposer extends React.Component<IProps, IState> {
|
||||||
const { permalinkCreator, relation, replyToEvent } = this.props;
|
const { permalinkCreator, relation, replyToEvent } = this.props;
|
||||||
const composerContent = this.state.composerContent;
|
const composerContent = this.state.composerContent;
|
||||||
this.setState({ composerContent: "", initialComposerContent: "" });
|
this.setState({ composerContent: "", initialComposerContent: "" });
|
||||||
|
dis.dispatch({ action: Action.ClearAndFocusSendMessageComposer });
|
||||||
await sendMessage(composerContent, this.state.isRichTextEnabled, {
|
await sendMessage(composerContent, this.state.isRichTextEnabled, {
|
||||||
mxClient: this.props.mxClient,
|
mxClient: this.props.mxClient,
|
||||||
roomContext: this.context,
|
roomContext: this.context,
|
||||||
|
@ -343,7 +344,6 @@ export class MessageComposer extends React.Component<IProps, IState> {
|
||||||
relation,
|
relation,
|
||||||
replyToEvent,
|
replyToEvent,
|
||||||
});
|
});
|
||||||
dis.dispatch({ action: Action.ClearAndFocusSendMessageComposer });
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue