/*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
(function(){\r
var resizeEditor = function( editor )\r
{\r
+ if ( !editor.window )\r
+ return;\r
var doc = editor.document,\r
currentHeight = editor.window.getViewPaneSize().height,\r
newHeight;\r
\r
// We can not use documentElement to calculate the height for IE (#6061).\r
- if ( CKEDITOR.env.ie )\r
- newHeight = doc.getBody().$.scrollHeight + 24;\r
+ // It is not good for IE Quirks, yet using offsetHeight would also not work as expected (#6408).\r
+ // We do the same for FF because of the html height workaround (#6341).\r
+ if ( CKEDITOR.env.ie || CKEDITOR.env.gecko )\r
+ newHeight = doc.getBody().$.scrollHeight + ( CKEDITOR.env.ie && CKEDITOR.env.quirks ? 0 : 24 );\r
else\r
newHeight = doc.getDocumentElement().$.offsetHeight;\r
\r
{\r
editor.on( eventName, function( evt )\r
{\r
+ var maximize = editor.getCommand( 'maximize' );\r
// Some time is required for insertHtml, and it gives other events better performance as well.\r
- if ( evt.editor.mode == 'wysiwyg' )\r
+ if ( evt.editor.mode == 'wysiwyg' &&\r
+ // Disable autogrow when the editor is maximized .(#6339)\r
+ ( !maximize || maximize.state != CKEDITOR.TRISTATE_ON ) )\r
+ {\r
setTimeout( function(){ resizeEditor( evt.editor ); }, 100 );\r
+ }\r
});\r
}\r
}\r
\r
/**\r
* Fired when the AutoGrow plugin is about to change the size of the editor.\r
- * @name CKEDITOR#autogrow\r
+ * @name CKEDITOR.editor#autogrow\r
* @event\r
* @param {Number} data.currentHeight The current height of the editor (before the resizing).\r
* @param {Number} data.newHeight The new height of the editor (after the resizing). It can be changed\r