mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-05 12:16:53 +02:00
re-apply formatting when editor is closed
This commit is contained in:
parent
d81ab2464b
commit
0c0052d06e
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user