diff --git a/src/wp-includes/js/mce-view.js b/src/wp-includes/js/mce-view.js index 209a7b9e20..5f4d846999 100644 --- a/src/wp-includes/js/mce-view.js +++ b/src/wp-includes/js/mce-view.js @@ -207,8 +207,18 @@ window.wp = window.wp || {}; iframeDoc.close(); resize = function() { + var $iframe, iframeDocHeight; + // Make sure the iframe still exists. - iframe.contentWindow && $( iframe ).height( $( iframeDoc.body ).height() ); + if ( iframe.contentWindow ) { + $iframe = $( iframe ); + iframeDocHeight = $( iframeDoc.body ).height(); + + if ( $iframe.height() !== iframeDocHeight ) { + $iframe.height( iframeDocHeight ); + editor.nodeChanged(); + } + } }; if ( MutationObserver ) {