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,
|
this.state.isRichTextEnabled,
|
||||||
{ mxClient: this.props.mxClient, roomContext: this.context, permalinkCreator, relation, replyToEvent });
|
{ mxClient: this.props.mxClient, roomContext: this.context, permalinkCreator, relation, replyToEvent });
|
||||||
dis.dispatch({ action: Action.ClearAndFocusSendMessageComposer });
|
dis.dispatch({ action: Action.ClearAndFocusSendMessageComposer });
|
||||||
|
this.setState({ composerContent: '', initialComposerContent: '' });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,8 @@ export function createMessageContent(
|
||||||
|
|
||||||
// const body = textSerialize(model);
|
// 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 bodyPrefix = isReplyAndEditing && getTextReplyFallback(editedEvent) || '';
|
||||||
const formattedBodyPrefix = isReplyAndEditing && getHtmlReplyFallback(editedEvent) || '';
|
const formattedBodyPrefix = isReplyAndEditing && getHtmlReplyFallback(editedEvent) || '';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue