Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 3793)
+++ /CKEditor/trunk/CHANGES.html	(revision 3794)
@@ -83,4 +83,6 @@
 		<li><a href="http://dev.fckeditor.net/ticket/3805">#3805</a> : Enabled SCAYT plugin for IE.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/3834">#3834</a> : Context menu on table caption was incorrect.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/3812">#3812</a> : Fixed an issue in which the editor
+			may show up empty or uneditable in IE7, 8 and Firefox 3.</li>
 	</ul>
 	<h3>
Index: /CKEditor/trunk/_source/core/editor.js
===================================================================
--- /CKEditor/trunk/_source/core/editor.js	(revision 3793)
+++ /CKEditor/trunk/_source/core/editor.js	(revision 3794)
@@ -366,4 +366,7 @@
 						|| getNewName();
 
+			if ( this.name in CKEDITOR.instances )
+				throw '[CKEDITOR.editor] The instance "' + this.name + '" already exists.';
+
 			/**
 			 * The configurations for this editor instance. It inherits all
Index: /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 3793)
+++ /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 3794)
@@ -211,4 +211,5 @@
 				{
 					var mainElement,
+						fieldset,
 						iframe,
 						isLoadingData,
@@ -224,33 +225,28 @@
 						if ( iframe )
 							iframe.remove();
-
-						iframe = new CKEDITOR.dom.element( 'iframe' )
-							.setAttributes({
-								frameBorder : 0,
-								tabIndex : -1,
-								allowTransparency : true })
-							.setStyles({
-								width : '100%',
-								height : '100%' });
-
-						if ( CKEDITOR.env.ie )
-						{
-							if ( isCustomDomain )
-							{
-								// The document domain must be set within the src
-								// attribute.
-								iframe.setAttribute( 'src',
-									'javascript:void( (function(){' +
-										'document.open();' +
-										'document.domain="' + document.domain + '";' +
-										'document.write( window.parent._cke_htmlToLoad_' + editor.name + ' );' +
-										'document.close();' +
-										'window.parent._cke_htmlToLoad_' + editor.name + ' = null;' +
-									'})() )' );
-							}
-							else
-								// To avoid HTTPS warnings.
-								iframe.setAttribute( 'src', 'javascript:void(0)' );
-						}
+						if ( fieldset )
+							fieldset.remove();
+
+						// The document domain must be set within the src
+						// attribute.
+						var src = 'void( (function(){' +
+								'document.open();' +
+								( CKEDITOR.env.ie && isCustomDomain ? 'document.domain="' + document.domain + '";' : '' ) +
+								'document.write( window.parent._cke_htmlToLoad_' + editor.name + ' );' +
+								'document.close();' +
+								'window.parent._cke_htmlToLoad_' + editor.name + ' = null;' +
+							'})() )';
+
+						// Loading via src attribute does not work in Opera.
+						if ( CKEDITOR.env.opera )
+							src = 'void(0);';
+
+						iframe = CKEDITOR.dom.element.createFromHtml( '<iframe' +
+								' style="width:100%;height:100%"' +
+								' frameBorder="0"' +
+								' tabIndex="-1"' +
+								' allowTransparency="true"' +
+								' src="javascript:' + encodeURIComponent( src ) + '"' +
+								'></iframe>' );
 
 						var accTitle = editor.lang.editorTitle.replace( '%1', editor.name );
@@ -278,5 +274,5 @@
 						{
 							// Accessibility label for IE.
-							var fieldset = CKEDITOR.dom.element.createFromHtml(
+							fieldset = CKEDITOR.dom.element.createFromHtml(
 								'<fieldset style="height:100%' +
 									( CKEDITOR.env.quirks ? ';position:relative' : '' ) +
@@ -444,9 +440,4 @@
 								if ( CKEDITOR.env.ie && ( CKEDITOR.env.quirks || CKEDITOR.env.version < 8 ) )
 									holderElement.setStyle( 'position', 'relative' );
-
-								// Create the iframe at load for all browsers
-								// except FF and IE with custom domain.
-								if ( !isCustomDomain || !CKEDITOR.env.gecko )
-									createIFrame();
 
 								// The editor data "may be dirty" after this
@@ -487,24 +478,10 @@
 									activationScript;
 
-								// For custom domain in IE, set the global variable
-								// that will temporarily hold the editor data. This
-								// reference will be used in the ifram src.
-								if ( isCustomDomain )
-									window[ '_cke_htmlToLoad_' + editor.name ] = data;
-
+								window[ '_cke_htmlToLoad_' + editor.name ] = data;
 								CKEDITOR._[ 'contentDomReady' + editor.name ] = contentDomReady;
-
-								// We need to recreate the iframe in FF for every
-								// data load, otherwise the following spellcheck
-								// and execCommand features will be active only for
-								// the first time.
-								// The same is valid for IE with custom domain,
-								// because the iframe src must be reset every time.
-								if ( isCustomDomain || CKEDITOR.env.gecko )
-									createIFrame();
-
-								// For custom domain in IE, the data loading is
-								// done through the src attribute of the iframe.
-								if ( !isCustomDomain )
+								createIFrame();
+
+								// Opera must use the old method for loading contents.
+								if ( CKEDITOR.env.opera )
 								{
 									var doc = iframe.$.contentWindow.document;
Index: /CKEditor/trunk/_source/themes/default/theme.js
===================================================================
--- /CKEditor/trunk/_source/themes/default/theme.js	(revision 3793)
+++ /CKEditor/trunk/_source/themes/default/theme.js	(revision 3794)
@@ -146,4 +146,26 @@
 			var container = editor.container;
 
+			/* 
+			 * IE BUG: Removing the editor DOM elements while the selection is inside
+			 * the editing area would break IE7/8's selection system. So we need to put
+			 * the selection back to the parent document without scrolling the window.
+			 * (#3812)
+			 */
+			if ( CKEDITOR.env.ie )
+			{
+				container.setStyle( 'display', 'none' );
+
+				var $range = document.body.createTextRange();
+				$range.moveToElementText( container.$ );
+				try 
+				{
+					// Putting the selection to a display:none element - this will certainly
+					// fail. But! We've just put the selection document back to the parent
+					// document without scrolling the window!
+					$range.select();
+				}
+				catch ( e ) {}
+			}
+
 			if ( container )
 				container.remove();
