Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5565)
+++ /CKEditor/trunk/CHANGES.html	(revision 5566)
@@ -52,4 +52,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/5759">#5759</a> : [IE] Clicking on the scrollbar and then on the host page causes error.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/5772">#5772</a> : List style dialog is missing tab page ids.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/5782">#5782</a> : [FF] Wysiwyg mode is broken by 'display' style changes on editor's parent DOM tree.</li>
 	</ul>
 	<h3>
Index: /CKEditor/trunk/_source/plugins/sourcearea/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/sourcearea/plugin.js	(revision 5565)
+++ /CKEditor/trunk/_source/plugins/sourcearea/plugin.js	(revision 5566)
@@ -192,4 +192,5 @@
 		{
 			modes : { wysiwyg:1, source:1 },
+			editorFocus : false,
 
 			exec : function( editor )
Index: /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 5565)
+++ /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 5566)
@@ -493,5 +493,8 @@
 							{
 								var doc = editor.document;
-								if ( CKEDITOR.env.gecko || CKEDITOR.env.opera )
+
+								if ( CKEDITOR.env.gecko )
+									blinkCursor();
+								else if ( CKEDITOR.env.opera )
 									doc.getBody().focus();
 								else if ( CKEDITOR.env.webkit )
@@ -820,11 +823,26 @@
 
 			// Switch on design mode for a short while and close it after then.
-			function blinkCursor()
+			function blinkCursor( retry )
 			{
-				editor.document.$.designMode = 'on';
-				setTimeout( function ()
+				CKEDITOR.tools.tryThese( function ()
 				{
+					editor.document.$.designMode = 'on';
+					setTimeout( function ()
+					{
+						editor.document.$.designMode = 'off';
+						editor.document.getBody().focus();
+					}, 50 );
+				}, function ()
+				{
+					// The above call is known to fail when parent DOM
+					// tree layout changes may break design mode. (#5782)
+					// Refresh the 'contentEditable' is a cue to this.
 					editor.document.$.designMode = 'off';
-				}, 50 );
+					var body = editor.document.getBody();
+					body.setAttribute( 'contentEditable', false );
+					body.setAttribute( 'contentEditable', true );
+					// Try it again once..
+					!retry && blinkCursor( 1 );
+				})
 			}
 
