JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.6.6.1
[ckeditor.git] / _source / plugins / maximize / plugin.js
index 5b405d0..6d31595 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
@@ -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
@@ -154,7 +154,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                        editor.addCommand( 'maximize',\r
                                {\r
-                                       modes : { wysiwyg : 1, source : 1 },\r
+                                       // Disabled on iOS (#8307).\r
+                                       modes : { wysiwyg : !CKEDITOR.env.iOS, source : !CKEDITOR.env.iOS },\r
+                                       readOnly : 1,\r
                                        editorFocus : false,\r
                                        exec : function()\r
                                        {\r
@@ -203,7 +205,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 +213,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