mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 03:36:07 +03:00
don't apply formatting to body when showing editor in TextualBody
it throws
This commit is contained in:
parent
aeea4ee83a
commit
5adae63555
1 changed files with 9 additions and 5 deletions
|
@ -89,7 +89,9 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
this._unmounted = false;
|
this._unmounted = false;
|
||||||
|
if (!this.props.isEditing) {
|
||||||
this._applyFormatting();
|
this._applyFormatting();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_applyFormatting() {
|
_applyFormatting() {
|
||||||
|
@ -128,11 +130,13 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
componentDidUpdate: function(prevProps) {
|
componentDidUpdate: function(prevProps) {
|
||||||
|
if (!this.props.isEditing) {
|
||||||
const messageWasEdited = prevProps.replacingEventId !== this.props.replacingEventId;
|
const messageWasEdited = prevProps.replacingEventId !== this.props.replacingEventId;
|
||||||
if (messageWasEdited) {
|
if (messageWasEdited) {
|
||||||
this._applyFormatting();
|
this._applyFormatting();
|
||||||
}
|
}
|
||||||
this.calculateUrlPreview();
|
this.calculateUrlPreview();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillUnmount: function() {
|
componentWillUnmount: function() {
|
||||||
|
|
Loading…
Reference in a new issue