JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.6
[ckeditor.git] / _source / plugins / maximize / plugin.js
index 5b405d0..4c04d14 100644 (file)
@@ -85,7 +85,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                for ( var i in all )\r
                {\r
                        var one = all[ i ];\r
-                       if ( one.mode == 'wysiwyg' )\r
+                       if ( one.mode == 'wysiwyg' && !one.readOnly )\r
                        {\r
                                var body = one.document.getBody();\r
                                // Refresh 'contentEditable' otherwise\r
@@ -155,6 +155,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        editor.addCommand( 'maximize',\r
                                {\r
                                        modes : { wysiwyg : 1, source : 1 },\r
+                                       readOnly : 1,\r
                                        editorFocus : false,\r
                                        exec : function()\r
                                        {\r
@@ -203,7 +204,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                                                        mainDocument.getDocumentElement().setStyles( styles );\r
                                                        !CKEDITOR.env.gecko && mainDocument.getDocumentElement().setStyle( 'position', 'fixed' );\r
-                                                       mainDocument.getBody().setStyles( styles );\r
+                                                       !( CKEDITOR.env.gecko && CKEDITOR.env.quirks ) && mainDocument.getBody().setStyles( styles );\r
 \r
                                                        // Scroll to the top left (IE needs some time for it - #4923).\r
                                                        CKEDITOR.env.ie ?\r
@@ -211,7 +212,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                mainWindow.$.scrollTo( 0, 0 );\r
 \r
                                                        // Resize and move to top left.\r
-                                                       container.setStyle( 'position', 'absolute' );\r
+                                                       // Special treatment for FF Quirks (#7284)\r
+                                                       container.setStyle( 'position', CKEDITOR.env.gecko && CKEDITOR.env.quirks ? 'fixed' : 'absolute' );\r
                                                        container.$.offsetLeft;                 // SAFARI BUG: See #2066.\r
                                                        container.setStyles(\r
                                                                {\r