diff --git a/src/wp-admin/edit-form-advanced.php b/src/wp-admin/edit-form-advanced.php index 4fa7e85e09..9356b1a245 100644 --- a/src/wp-admin/edit-form-advanced.php +++ b/src/wp-admin/edit-form-advanced.php @@ -496,7 +496,7 @@ if ( post_type_supports($post_type, 'editor') ) { 'dfw' => true, 'drag_drop_upload' => true, 'tabfocus_elements' => 'insert-media-button-1,save-post', - 'editor_height' => 360, + 'editor_height' => 300, 'tinymce' => array( 'resize' => false, 'wp_autoresize_on' => ( ! empty( $_wp_autoresize_on ) && get_user_setting( 'editor_expand', 'on' ) === 'on' ), diff --git a/src/wp-admin/js/editor-expand.js b/src/wp-admin/js/editor-expand.js index b244059104..4e3dbf8541 100644 --- a/src/wp-admin/js/editor-expand.js +++ b/src/wp-admin/js/editor-expand.js @@ -34,6 +34,7 @@ jQuery( document ).ready( function($) { pageYOffsetAtTop = 130, pinnedToolsTop = 56, autoresizeMinHeight = 300, + initialMode = window.getUserSetting( 'editor' ), // These are corrected when adjust() runs, except on scrolling if already set. heights = { windowHeight: 0, @@ -119,7 +120,7 @@ jQuery( document ).ready( function($) { } function textEditorResize() { - if ( mceEditor && ! mceEditor.isHidden() ) { + if ( ( mceEditor && ! mceEditor.isHidden() ) || ( ! mceEditor && initialMode === 'tinymce' ) ) { return; } diff --git a/src/wp-includes/class-wp-editor.php b/src/wp-includes/class-wp-editor.php index 9659336fe9..200031bbdc 100644 --- a/src/wp-includes/class-wp-editor.php +++ b/src/wp-includes/class-wp-editor.php @@ -112,7 +112,7 @@ final class _WP_Editors { if ( empty( $set['editor_height'] ) ) return $set; - if ( 'content' === $editor_id ) { + if ( 'content' === $editor_id && empty( $set['tinymce']['wp_autoresize_on'] ) ) { // A cookie (set when a user resizes the editor) overrides the height. $cookie = (int) get_user_setting( 'ed_size' ); diff --git a/src/wp-includes/js/tinymce/plugins/wpautoresize/plugin.js b/src/wp-includes/js/tinymce/plugins/wpautoresize/plugin.js index 600c12335e..dc1f524437 100644 --- a/src/wp-includes/js/tinymce/plugins/wpautoresize/plugin.js +++ b/src/wp-includes/js/tinymce/plugins/wpautoresize/plugin.js @@ -22,7 +22,7 @@ */ tinymce.PluginManager.add( 'wpautoresize', function( editor ) { var settings = editor.settings, - oldSize = 0, + oldSize = 300, isActive = false; function isFullscreen() {