X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fautogrow%2Fplugin.js;h=f31e9c692be9b64a3d2b15497be3f51ba306cd37;hp=cd3fc3da65e484e6682a94d3cf35bfd9ff851795;hb=039a051ccf3901311661022a30afd60fc38130c9;hpb=c9fdde67e6384bd5a66adc2b3bba5c4ce9db56c7 diff --git a/_source/plugins/autogrow/plugin.js b/_source/plugins/autogrow/plugin.js index cd3fc3d..f31e9c6 100644 --- a/_source/plugins/autogrow/plugin.js +++ b/_source/plugins/autogrow/plugin.js @@ -14,8 +14,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license newHeight; // We can not use documentElement to calculate the height for IE (#6061). - if ( CKEDITOR.env.ie ) - newHeight = doc.getBody().$.scrollHeight + 24; + // It is not good for IE Quirks, yet using offsetHeight would also not work as expected (#6408). + // We do the same for FF because of the html height workaround (#6341). + if ( CKEDITOR.env.ie || CKEDITOR.env.gecko ) + newHeight = doc.getBody().$.scrollHeight + ( CKEDITOR.env.ie && CKEDITOR.env.quirks ? 0 : 24 ); else newHeight = doc.getDocumentElement().$.offsetHeight; @@ -41,9 +43,14 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { editor.on( eventName, function( evt ) { + var maximize = editor.getCommand( 'maximize' ); // Some time is required for insertHtml, and it gives other events better performance as well. - if ( evt.editor.mode == 'wysiwyg' ) + if ( evt.editor.mode == 'wysiwyg' && + // Disable autogrow when the editor is maximized .(#6339) + ( !maximize || maximize.state != CKEDITOR.TRISTATE_ON ) ) + { setTimeout( function(){ resizeEditor( evt.editor ); }, 100 ); + } }); } }