TinyMCE in iOS:

- Fix placing the caret at the bottom of longer posts when the keyboard is open.
- Disable resizing on switching editors and on show/hide the kitchen sink row.
See #28242

git-svn-id: https://develop.svn.wordpress.org/trunk@28626 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2014-05-30 02:37:52 +00:00
parent 7f49c1320a
commit d87a482353
3 changed files with 36 additions and 12 deletions
+12 -9
View File
@@ -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';
}
}
}