Editor: disable the textarea resizing handle on touch devices (cannot be used there), don't save TinyMCE's height in iOS as the user cannot set/change it there (it expands the iframe to full height), see #21718

git-svn-id: https://develop.svn.wordpress.org/trunk@22606 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2012-11-16 00:34:07 +00:00
parent b13b36db98
commit c4622fdbf7
1 changed files with 5 additions and 1 deletions

View File

@ -619,6 +619,9 @@ jQuery(document).ready( function($) {
// resizable textarea#content
(function() {
var textarea = $('textarea#content'), offset = null, el;
// No point for touch devices
if ( 'ontouchstart' in window )
return;
function dragging(e) {
textarea.height( Math.max(50, offset + e.pageY) + 'px' );
@ -650,7 +653,8 @@ jQuery(document).ready( function($) {
if ( typeof(tinymce) != 'undefined' ) {
tinymce.onAddEditor.add(function(mce, ed){
if ( ed.id != 'content' )
// iOS expands the iframe to full height and the user cannot adjust it.
if ( ed.id != 'content' || tinymce.isIOS5 )
return;
// resize TinyMCE to match the textarea height when switching Text -> Visual