Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5876)
+++ /CKEditor/trunk/CHANGES.html	(revision 5877)
@@ -79,4 +79,5 @@
 		<li><a href="http://dev.ckeditor.com/ticket/5335">#5335</a> : Several lines' formatted data will be merged to one line when we apply Numbers/Bullets.</li>
 		<li><a href="http://dev.ckeditor.com/ticket/5353">#5353</a> : wrong width of editor after resize() called in firefox 3.6.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/5778">#5778</a> : [IE] Unwanted scroll on first mouse right-click.</li>
 		<li>Updated the following language files:<ul>
 			<li><a href="http://dev.ckeditor.com/ticket/6246">#6246</a> : Chinese Simplified;</li>
Index: /CKEditor/trunk/_source/plugins/selection/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/selection/plugin.js	(revision 5876)
+++ /CKEditor/trunk/_source/plugins/selection/plugin.js	(revision 5877)
@@ -208,14 +208,32 @@
 						}
 
+						var scroll;
 						// IE fires the "selectionchange" event when clicking
 						// inside a selection. We don't want to capture that.
-						body.on( 'mousedown', function ()
-						{
+						body.on( 'mousedown', function( evt )
+						{
+							// IE scrolls document to top on right mousedown
+							// when editor has no focus, remember this scroll
+							// position and revert it before context menu opens. (#5778)
+							if ( evt.data.$.button == 2 )
+							{
+								var sel = editor.document.$.selection;
+								if ( sel.type == 'None' )
+									scroll = editor.window.getScrollPosition();
+							}
 							disableSave();
 						});
 
 						body.on( 'mouseup',
-							function()
-							{
+							function( evt )
+							{
+								// Restore recorded scroll position when needed on right mouseup.
+								if ( evt.data.$.button == 2 && scroll )
+								{
+									editor.document.$.documentElement.scrollLeft = scroll.x;
+									editor.document.$.documentElement.scrollTop = scroll.y;
+								}
+								scroll = null;  
+
 								saveEnabled = true;
 								setTimeout( function()
