Make WordPress Core

Ticket #30646: 30646.patch

File 30646.patch, 783 bytes (added by iseulde, 11 years ago)
  • src/wp-includes/js/mce-view.js

     
    207207                                                iframeDoc.close();
    208208
    209209                                                resize = function() {
     210                                                        var $iframe, iframeDocHeight;
     211
    210212                                                        // Make sure the iframe still exists.
    211                                                         iframe.contentWindow && $( iframe ).height( $( iframeDoc.body ).height() );
     213                                                        if ( iframe.contentWindow ) {
     214                                                                $iframe = $( iframe );
     215                                                                iframeDocHeight = $( iframeDoc.body ).height();
     216
     217                                                                if ( $iframe.height() !== iframeDocHeight ) {
     218                                                                        $iframe.height( iframeDocHeight );
     219                                                                        editor.nodeChanged();
     220                                                                }
     221                                                        }
    212222                                                };
    213223
    214224                                                if ( MutationObserver ) {