Editor scrolling: disable on mobile devices and hide the resize handle. See #28328.

Built from https://develop.svn.wordpress.org/trunk@29117


git-svn-id: http://core.svn.wordpress.org/trunk@28903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-07-12 00:54:14 +00:00
parent c0052b6af2
commit 39bf5e06b1
3 changed files with 6 additions and 3 deletions

View File

@ -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,
),
) ); ?>

View File

@ -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;
}

File diff suppressed because one or more lines are too long