JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.2
[ckeditor.git] / _source / plugins / autogrow / plugin.js
index cd3fc3d..f31e9c6 100644 (file)
@@ -14,8 +14,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        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
@@ -41,9 +43,14 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        {\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