Make WordPress Core

Changeset 31361


Ignore:
Timestamp:
02/06/2015 10:24:43 PM (10 years ago)
Author:
azaozz
Message:

Editor: prevent errors in editor-expand when the Text editor is not used. Props iseulde, fixes #31163.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/editor-expand.js

    r31118 r31361  
    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,
     
    349349                $editor = $textEditor;
    350350                topHeight = heights.textTopHeight;
     351            }
     352
     353            // TinyMCE still intializing.
     354            if ( ! visual && ! $top.length ) {
     355                return;
    351356            }
    352357
Note: See TracChangeset for help on using the changeset viewer.