mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Fix switching bug and br tag in firefox
This commit is contained in:
parent
423f87a43a
commit
928a23e9d0
2 changed files with 3 additions and 1 deletions
|
@ -339,6 +339,7 @@ export class MessageComposer extends React.Component<IProps, IState> {
|
|||
this.state.isRichTextEnabled,
|
||||
{ mxClient: this.props.mxClient, roomContext: this.context, permalinkCreator, relation, replyToEvent });
|
||||
dis.dispatch({ action: Action.ClearAndFocusSendMessageComposer });
|
||||
this.setState({ composerContent: '', initialComposerContent: '' });
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -82,7 +82,8 @@ export function createMessageContent(
|
|||
|
||||
// const body = textSerialize(model);
|
||||
|
||||
const body = isHTML && htmlToPlainText(message) || message;
|
||||
// TODO remove this ugly hack for replace br tag
|
||||
const body = isHTML && htmlToPlainText(message) || message.replace(/<br>/g, '\n');
|
||||
const bodyPrefix = isReplyAndEditing && getTextReplyFallback(editedEvent) || '';
|
||||
const formattedBodyPrefix = isReplyAndEditing && getHtmlReplyFallback(editedEvent) || '';
|
||||
|
||||
|
|
Loading…
Reference in a new issue