mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
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: http://core.svn.wordpress.org/trunk@22606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
01706d8d11
commit
a19764fcdc
@ -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…
x
Reference in New Issue
Block a user