JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.3.2
[ckeditor.git] / _source / plugins / maximize / plugin.js
index a5a06fc..9f18043 100644 (file)
@@ -80,6 +80,21 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
        function refreshCursor( editor )\r
        {\r
+               // Refresh all editor instances on the page (#5724).\r
+               var all = CKEDITOR.instances;\r
+               for ( var i in all )\r
+               {\r
+                       var one = all[ i ];\r
+                       if ( one.mode == 'wysiwyg' )\r
+                       {\r
+                               var body = one.document.getBody();\r
+                               // Refresh 'contentEditable' otherwise\r
+                               // DOM lifting breaks design mode. (#5560)\r
+                               body.setAttribute( 'contentEditable', false );\r
+                               body.setAttribute( 'contentEditable', true );\r
+                       }\r
+               }\r
+\r
                if ( editor.focusManager.hasFocus )\r
                {\r
                        editor.toolbox.focus();\r
@@ -211,6 +226,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                } );\r
 \r
                                                        shim =  createIframeShim( container );          // IE6 select element penetration when maximized. (#4459)\r
+\r
+                                                       // Add cke_maximized class before resize handle since that will change things sizes (#5580)\r
+                                                       container.addClass( 'cke_maximized' );\r
+\r
                                                        resizeHandler();\r
 \r
                                                        // Still not top left? Fix it. (Bug #174)\r
@@ -224,8 +243,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                        // Fixing positioning editor chrome in Firefox break design mode. (#5149)\r
                                                        CKEDITOR.env.gecko && refreshCursor( editor );\r
 \r
-                                                       // Add cke_maximized class.\r
-                                                       container.addClass( 'cke_maximized' );\r
                                                }\r
                                                else if ( this.state == CKEDITOR.TRISTATE_ON )  // Restore from fullscreen if the state is on.\r
                                                {\r