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:
parent
b13b36db98
commit
c4622fdbf7
@ -619,6 +619,9 @@ jQuery(document).ready( function($) {
|
|||||||
// resizable textarea#content
|
// resizable textarea#content
|
||||||
(function() {
|
(function() {
|
||||||
var textarea = $('textarea#content'), offset = null, el;
|
var textarea = $('textarea#content'), offset = null, el;
|
||||||
|
// No point for touch devices
|
||||||
|
if ( 'ontouchstart' in window )
|
||||||
|
return;
|
||||||
|
|
||||||
function dragging(e) {
|
function dragging(e) {
|
||||||
textarea.height( Math.max(50, offset + e.pageY) + 'px' );
|
textarea.height( Math.max(50, offset + e.pageY) + 'px' );
|
||||||
@ -650,7 +653,8 @@ jQuery(document).ready( function($) {
|
|||||||
|
|
||||||
if ( typeof(tinymce) != 'undefined' ) {
|
if ( typeof(tinymce) != 'undefined' ) {
|
||||||
tinymce.onAddEditor.add(function(mce, ed){
|
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;
|
return;
|
||||||
|
|
||||||
// resize TinyMCE to match the textarea height when switching Text -> Visual
|
// resize TinyMCE to match the textarea height when switching Text -> Visual
|
||||||
|
Loading…
Reference in New Issue
Block a user