Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5741)
+++ /CKEditor/trunk/CHANGES.html	(revision 5742)
@@ -91,4 +91,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/5224">#5224</a> : Some invalid markup could break the editor.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/5455">#5455</a> : It was not possible to remove formatting from pasted content on specific cases.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/5735">#5735</a> : IE: The editor was having focus issues when the previous selection got hidden by scroll operations.</li>
 		<li>Updated the following language files:<ul>
 			<li><a href="http://dev.fckeditor.net/ticket/5962">#5962</a> : German;</li>
Index: /CKEditor/trunk/_source/plugins/selection/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/selection/plugin.js	(revision 5741)
+++ /CKEditor/trunk/_source/plugins/selection/plugin.js	(revision 5742)
@@ -106,5 +106,6 @@
 				{
 					var doc = editor.document,
-						body = doc.getBody();
+						body = doc.getBody(),
+						html = doc.getDocumentElement();
 
 					if ( CKEDITOR.env.ie )
@@ -116,5 +117,6 @@
 
 						var savedRange,
-							saveEnabled;
+							saveEnabled,
+							restoreEnabled = 1;
 
 						// "onfocusin" is fired before "onfocus". It makes it
@@ -132,11 +134,14 @@
 								if ( savedRange )
 								{
-									// Well not break because of this.
-									try
+									if ( restoreEnabled )
 									{
-										savedRange.select();
+										// Well not break because of this.
+										try
+										{
+											savedRange.select();
+										}
+										catch (e)
+										{}
 									}
-									catch (e)
-									{}
 
 									savedRange = null;
@@ -161,4 +166,5 @@
 								// Disable selections from being saved.
 								saveEnabled = false;
+								restoreEnabled = 1;
 							});
 
@@ -167,5 +173,5 @@
 						if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 )
 						{
-							doc.getWindow().on( 'blur', function( evt )
+							editor.on( 'blur', function( evt )
 							{
 								editor.document.$.selection.empty();
@@ -173,7 +179,26 @@
 						}
 
+						// Listening on document element ensures that
+						// scrollbar is included. (#5280)
+						html.on( 'mousedown', function ()
+						{
+							// Lock restore selection now, as we have
+							// a followed 'click' event which introduce
+							// new selection. (#5735)
+							restoreEnabled = 0;
+						});
+
+						html.on( 'mouseup', function ()
+						{
+							restoreEnabled = 1;
+						});
+
 						// IE fires the "selectionchange" event when clicking
 						// inside a selection. We don't want to capture that.
-						body.on( 'mousedown', disableSave );
+						body.on( 'mousedown', function ()
+						{
+							disableSave();
+						});
+
 						body.on( 'mouseup',
 							function()
