Index: /FCKeditor/trunk/_whatsnew.html
===================================================================
--- /FCKeditor/trunk/_whatsnew.html	(revision 2143)
+++ /FCKeditor/trunk/_whatsnew.html	(revision 2144)
@@ -59,4 +59,7 @@
 			3, the entire page was scrolling when inserting block elements with the FCK.InsertElement
 			function, used by the Table and Horizontal Rule buttons.. </li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2323">#2323</a>] Fixed the issue
+			where the show blocks command loses the current selection from the view area when editing
+			a long document.</li>
 	</ul>
 	<p>
Index: /FCKeditor/trunk/editor/_source/commandclasses/fckshowblocks.js
===================================================================
--- /FCKeditor/trunk/editor/_source/commandclasses/fckshowblocks.js	(revision 2143)
+++ /FCKeditor/trunk/editor/_source/commandclasses/fckshowblocks.js	(revision 2144)
@@ -45,4 +45,21 @@
 		body.className += ' FCK__ShowBlocks' ;
 
+	if ( FCKBrowserInfo.IsIE )
+	{
+		try
+		{
+			FCK.EditorDocument.selection.createRange().select() ;
+		}
+		catch ( e )
+		{}
+	}
+	else
+	{
+		var focus = FCK.EditorWindow.getSelection().focusNode ;
+		if ( focus.nodeType != 1 )
+			focus = focus.parentNode ;
+		FCKDomTools.ScrollIntoView( focus, false ) ;
+	}
+
 	FCK.Events.FireEvent( 'OnSelectionChange' ) ;
 }
Index: /FCKeditor/trunk/editor/_source/internals/fckdomtools.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckdomtools.js	(revision 2143)
+++ /FCKeditor/trunk/editor/_source/internals/fckdomtools.js	(revision 2144)
@@ -1005,5 +1005,5 @@
 		// Scroll the window to the desired position, if not already visible.
 		var currentScroll = FCKTools.GetScrollPosition( window ).Y ;
-		if ( offset > 0 && offset > currentScroll )
+		if ( offset > 0 && ( offset > currentScroll || offset < currentScroll - windowHeight ) )
 			window.scrollTo( 0, offset ) ;
 	},
