Index: /CKEditor/trunk/_samples/replacebyclass.html
===================================================================
--- /CKEditor/trunk/_samples/replacebyclass.html	(revision 7389)
+++ /CKEditor/trunk/_samples/replacebyclass.html	(revision 7390)
@@ -55,284 +55,4 @@
 		</p>
 	</form>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
-	<div class="description">
-	<p>
-		This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
-		of a given class with a CKEditor instance.
-	</p>
-	<p>
-		To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
-		class, as in the code below:
-	</p>
-	<pre class="samples">&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;</pre>
-	<p>
-		Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
-	</p>
-	</div>
 	<div id="footer">
 		<hr />
Index: /CKEditor/trunk/_source/plugins/selection/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/selection/plugin.js	(revision 7389)
+++ /CKEditor/trunk/_source/plugins/selection/plugin.js	(revision 7390)
@@ -303,22 +303,20 @@
 								saveEnabled = 0;
 								restoreEnabled = 1;
-
 							});
 
-						// [IE] Iframe will still keep the selection when blurred, if
-						// focus is moved onto a non-editing host, e.g. link or button, but
-						// it becomes a problem for the object type selection, since the resizer
-						// handler attached on it will mark other part of the UI, especially
-						// for the dialog. (#8157)
-						// [IE<8] Even worse For old IEs, the cursor will not vanish even if
-						// the selection has been moved to another text input in some cases. (#4716)
-						//
-						// Now the range restore is disabled, so we simply force IE to clean
-						// up the selection before blur.
-						CKEDITOR.env.ie && doc.getWindow().on( 'blur', function()
-						{
-							// Error proof when the editor is not visible. (#6375)
-							try{ doc.$.selection.empty(); } catch ( er){}
-						});
+						// IE before version 8 will leave cursor blinking inside the document after
+						// editor blurred unless we clean up the selection. (#4716)
+						if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 )
+						{
+							editor.on( 'blur', function( evt )
+							{
+								// Try/Catch to avoid errors if the editor is hidden. (#6375)
+								try
+								{
+									editor.document && editor.document.$.selection.empty();
+								}
+								catch (e) {}
+							});
+						}
 
 						// Listening on document element ensures that
