diff --git a/src/wp-admin/edit-form-advanced.php b/src/wp-admin/edit-form-advanced.php index b9d35611f6..52e0c6c125 100644 --- a/src/wp-admin/edit-form-advanced.php +++ b/src/wp-admin/edit-form-advanced.php @@ -12,8 +12,9 @@ if ( !defined('ABSPATH') ) wp_enqueue_script('post'); -if ( post_type_supports( $post_type, 'editor' ) ) { +if ( post_type_supports( $post_type, 'editor' ) && ! wp_is_mobile() ) { wp_enqueue_script('editor-expand'); + $_wp_autoresize_on = true; } if ( wp_is_mobile() ) @@ -496,7 +497,7 @@ if ( post_type_supports($post_type, 'editor') ) { 'editor_height' => 360, 'tinymce' => array( 'resize' => false, - 'wp_autoresize_on' => true, + 'wp_autoresize_on' => ! empty( $_wp_autoresize_on ), 'add_unload_trigger' => false, ), ) ); ?> diff --git a/src/wp-admin/js/post.js b/src/wp-admin/js/post.js index 577bb92635..73a685e530 100644 --- a/src/wp-admin/js/post.js +++ b/src/wp-admin/js/post.js @@ -1009,6 +1009,8 @@ jQuery(document).ready( function($) { // No point for touch devices if ( ! $textarea.length || 'ontouchstart' in window ) { + // Hide the resize handle + $('#content-resize-handle').hide(); return; }