diff --git a/packages/editor/src/components/rich-text/tinymce.js b/packages/editor/src/components/rich-text/tinymce.js index d2a300a8d9cdb2..4e6ab5c17562b1 100644 --- a/packages/editor/src/components/rich-text/tinymce.js +++ b/packages/editor/src/components/rich-text/tinymce.js @@ -130,15 +130,7 @@ export default class TinyMCE extends Component { this.initialize(); } - shouldComponentUpdate() { - // We must prevent rerenders because TinyMCE will modify the DOM, thus - // breaking React's ability to reconcile changes. - // - // See: https://github.com/facebook/react/issues/6802 - return false; - } - - componentWillReceiveProps( nextProps ) { + shouldComponentUpdate( nextProps ) { this.configureIsPlaceholderVisible( nextProps.isPlaceholderVisible ); if ( ! isEqual( this.props.style, nextProps.style ) ) { @@ -155,6 +147,12 @@ export default class TinyMCE extends Component { this.editorNode.removeAttribute( key ) ); updatedKeys.forEach( ( key ) => this.editorNode.setAttribute( key, nextProps[ key ] ) ); + + // We must prevent rerenders because TinyMCE will modify the DOM, thus + // breaking React's ability to reconcile changes. + // + // See: https://github.com/facebook/react/issues/6802 + return false; } componentWillUnmount() {