re-apply formatting when editor is closed

pull/21833/head
Bruno Windels 2019-05-20 10:19:29 +02:00
parent d81ab2464b
commit 0c0052d06e
1 changed files with 2 additions and 1 deletions

View File

@ -131,8 +131,9 @@ module.exports = React.createClass({
componentDidUpdate: function(prevProps) {
if (!this.props.isEditing) {
const stoppedEditing = prevProps.isEditing && !this.props.isEditing;
const messageWasEdited = prevProps.replacingEventId !== this.props.replacingEventId;
if (messageWasEdited) {
if (messageWasEdited || stoppedEditing) {
this._applyFormatting();
}
this.calculateUrlPreview();