diff --git a/wp-admin/js/editor.js b/wp-admin/js/editor.js
index e718716355..c0d3ba0454 100644
--- a/wp-admin/js/editor.js
+++ b/wp-admin/js/editor.js
@@ -60,7 +60,8 @@ window.switchEditors = {
if ( ed ) {
ed.show();
- if ( editorHeight ) {
+ // No point resizing the iframe in iOS
+ if ( ! tinymce.Env.iOS && editorHeight ) {
toolbarHeight = getToolbarHeight();
editorHeight = editorHeight - toolbarHeight + 14;
@@ -84,16 +85,18 @@ window.switchEditors = {
}
if ( ed ) {
- iframe = DOM.get( id + '_ifr' );
- editorHeight = iframe ? parseInt( iframe.style.height, 10 ) : 0;
+ if ( ! tinymce.Env.iOS ) {
+ iframe = DOM.get( id + '_ifr' );
+ editorHeight = iframe ? parseInt( iframe.style.height, 10 ) : 0;
- if ( editorHeight ) {
- toolbarHeight = getToolbarHeight();
- editorHeight = editorHeight + toolbarHeight - 14;
+ if ( editorHeight ) {
+ toolbarHeight = getToolbarHeight();
+ editorHeight = editorHeight + toolbarHeight - 14;
- // height cannot be under 50 or over 5000
- if ( editorHeight > 50 && editorHeight < 5000 ) {
- txtarea_el.style.height = editorHeight + 'px';
+ // height cannot be under 50 or over 5000
+ if ( editorHeight > 50 && editorHeight < 5000 ) {
+ txtarea_el.style.height = editorHeight + 'px';
+ }
}
}
diff --git a/wp-admin/js/editor.min.js b/wp-admin/js/editor.min.js
index 9babf7bdf1..c8b7409c31 100644
--- a/wp-admin/js/editor.min.js
+++ b/wp-admin/js/editor.min.js
@@ -1 +1 @@
-window.switchEditors={switchto:function(a){var b=a.id,c=b.length,d=b.substr(0,c-5),e=b.substr(c-4);this.go(d,e)},go:function(a,b){function c(){var a=k.select(".mce-toolbar-grp",d.getContainer())[0],b=a&&a.clientHeight;return b&&b>10&&200>b?parseInt(b,10):30}var d,e,f,g,h,i,j=this,k=tinymce.DOM;if(a=a||"content",b=b||"toggle",d=tinymce.get(a),e="wp-"+a+"-wrap",f=k.get(a),"toggle"===b&&(b=d&&!d.isHidden()?"html":"tmce"),"tmce"===b||"tinymce"===b){if(d&&!d.isHidden())return!1;"undefined"!=typeof QTags&&QTags.closeAllTags(a),h=f?parseInt(f.style.height,10):0,tinyMCEPreInit.mceInit[a]&&tinyMCEPreInit.mceInit[a].wpautop&&(f.value=j.wpautop(f.value)),d?(d.show(),h&&(i=c(),h=h-i+14,h>50&&5e3>h&&d.theme.resizeTo(null,h))):tinymce.init(tinyMCEPreInit.mceInit[a]),k.removeClass(e,"html-active"),k.addClass(e,"tmce-active"),setUserSetting("editor","tinymce")}else if("html"===b){if(d&&d.isHidden())return!1;d?(g=k.get(a+"_ifr"),h=g?parseInt(g.style.height,10):0,h&&(i=c(),h=h+i-14,h>50&&5e3>h&&(f.style.height=h+"px")),d.hide()):(tinyMCEPreInit.mceInit[a]&&tinyMCEPreInit.mceInit[a].wpautop&&(f.value=j.pre_wpautop(f.value)),k.setStyles(f,{display:"",visibility:""})),k.removeClass(e,"tmce-active"),k.addClass(e,"html-active"),setUserSetting("editor","html")}return!1},_wp_Nop:function(a){var b,c,d=!1,e=!1;return(-1!==a.indexOf("
]*>[\s\S]+?<\/\1>/g,function(a){return a=a.replace(/
(\r\n|\n)?/g,""),a=a.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,""),a.replace(/\r?\n/g,"")})),-1!==a.indexOf("[caption")&&(e=!0,a=a.replace(/\[caption[\s\S]+?\[\/caption\]/g,function(a){return a.replace(/
]*)>/g,"").replace(/[\r\n\t]+/,"")})),b="blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|div|h[1-6]|p|fieldset",a=a.replace(new RegExp("\\s*("+b+")>\\s*","g"),"$1>\n"),a=a.replace(new RegExp("\\s*<((?:"+b+")(?: [^>]*)?)>","g"),"\n<$1>"),a=a.replace(/(]+>.*?)<\/p>/g,"$1
"),a=a.replace(/]*)?>\s*
/gi,"
\n\n"),a=a.replace(/\s*
/gi,""),a=a.replace(/\s*<\/p>\s*/gi,"\n\n"),a=a.replace(/\n[\s\u00a0]+\n/g,"\n\n"),a=a.replace(/\s*
\s*/gi,"\n"),a=a.replace(/\s*
\s*/g,"
\n"),a=a.replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,"\n\n[caption$1[/caption]\n\n"),a=a.replace(/caption\]\n\n+\[caption/g,"caption]\n\n[caption"),c="blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|h[1-6]|pre|fieldset",a=a.replace(new RegExp("\\s*<((?:"+c+")(?: [^>]*)?)\\s*>","g"),"\n<$1>"),a=a.replace(new RegExp("\\s*("+c+")>\\s*","g"),"$1>\n"),a=a.replace(/
]*)>/g," "),-1!==a.indexOf("
]*)?>\s*/g,"\n\n
\n\n")),-1!==a.indexOf("