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

git-svn-id: https://develop.svn.wordpress.org/trunk@29117 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2014-07-12 00:53:08 +00:00
parent d42f6c10af
commit dbb367bee8
2 changed files with 5 additions and 2 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;
}