don't apply formatting to body when showing editor in TextualBody
it throwspull/21833/head
							parent
							
								
									aeea4ee83a
								
							
						
					
					
						commit
						5adae63555
					
				| 
						 | 
					@ -89,7 +89,9 @@ module.exports = React.createClass({
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    componentDidMount: function() {
 | 
					    componentDidMount: function() {
 | 
				
			||||||
        this._unmounted = false;
 | 
					        this._unmounted = false;
 | 
				
			||||||
        this._applyFormatting();
 | 
					        if (!this.props.isEditing) {
 | 
				
			||||||
 | 
					            this._applyFormatting();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    _applyFormatting() {
 | 
					    _applyFormatting() {
 | 
				
			||||||
| 
						 | 
					@ -128,11 +130,13 @@ module.exports = React.createClass({
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    componentDidUpdate: function(prevProps) {
 | 
					    componentDidUpdate: function(prevProps) {
 | 
				
			||||||
        const messageWasEdited = prevProps.replacingEventId !== this.props.replacingEventId;
 | 
					        if (!this.props.isEditing) {
 | 
				
			||||||
        if (messageWasEdited) {
 | 
					            const messageWasEdited = prevProps.replacingEventId !== this.props.replacingEventId;
 | 
				
			||||||
            this._applyFormatting();
 | 
					            if (messageWasEdited) {
 | 
				
			||||||
 | 
					                this._applyFormatting();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            this.calculateUrlPreview();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        this.calculateUrlPreview();
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    componentWillUnmount: function() {
 | 
					    componentWillUnmount: function() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue