Make WordPress Core

Ticket #31163: 31163.patch

File 31163.patch, 831 bytes (added by iseulde, 11 years ago)
  • src/wp-admin/js/editor-expand.js

     
    323323                        var windowPos = $window.scrollTop(),
    324324                                type = event && event.type,
    325325                                resize = type !== 'scroll',
    326                                 visual = ( mceEditor && ! mceEditor.isHidden() ),
     326                                visual = mceEditor && ! mceEditor.isHidden(),
    327327                                buffer = autoresizeMinHeight,
    328328                                postBodyTop = $postBody.offset().top,
    329329                                borderWidth = 1,
     
    350350                                topHeight = heights.textTopHeight;
    351351                        }
    352352
     353                        // TinyMCE still intializing.
     354                        if ( ! visual && ! $top.length ) {
     355                                return;
     356                        }
     357
    353358                        topPos = $top.parent().offset().top;
    354359                        editorPos = $editor.offset().top;
    355360                        editorHeight = $editor.outerHeight();