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

git-svn-id: https://develop.svn.wordpress.org/trunk@31361 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2015-02-06 22:24:43 +00:00
parent 1b6e82cf98
commit 329115bf05

View File

@ -323,7 +323,7 @@
var windowPos = $window.scrollTop(),
type = event && event.type,
resize = type !== 'scroll',
visual = ( mceEditor && ! mceEditor.isHidden() ),
visual = mceEditor && ! mceEditor.isHidden(),
buffer = autoresizeMinHeight,
postBodyTop = $postBody.offset().top,
borderWidth = 1,
@ -350,6 +350,11 @@
topHeight = heights.textTopHeight;
}
// TinyMCE still intializing.
if ( ! visual && ! $top.length ) {
return;
}
topPos = $top.parent().offset().top;
editorPos = $editor.offset().top;
editorHeight = $editor.outerHeight();