- var viewPaneSize = mainWindow.getViewPaneSize();\r
- editor.resize( viewPaneSize.width, viewPaneSize.height, null, true );\r
- };\r
+ var one = all[ i ];\r
+ if ( one.mode == 'wysiwyg' && !one.readOnly )\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
+ editor.focus();\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Adding an iframe shim to this element, OR removing the existing one if already applied.\r
+ * Note: This will only affect IE version below 7.\r
+ */\r
+ function createIframeShim( element )\r
+ {\r
+ if ( !CKEDITOR.env.ie || CKEDITOR.env.version > 6 )\r
+ return null;\r
+\r
+ var shim = CKEDITOR.dom.element.createFromHtml( '<iframe frameborder="0" tabindex="-1"' +\r
+ ' src="javascript:' +\r
+ 'void((function(){' +\r
+ 'document.open();' +\r
+ ( CKEDITOR.env.isCustomDomain() ? 'document.domain=\'' + this.getDocument().$.domain + '\';' : '' ) +\r
+ 'document.close();' +\r
+ '})())"' +\r
+ ' style="display:block;position:absolute;z-index:-1;' +\r
+ 'progid:DXImageTransform.Microsoft.Alpha(opacity=0);' +\r
+ '"></iframe>' );\r
+ return element.append( shim, true );\r