Index: /FCKeditor/trunk/editor/_source/internals/fck_gecko.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fck_gecko.js	(revision 597)
+++ /FCKeditor/trunk/editor/_source/internals/fck_gecko.js	(revision 598)
@@ -70,4 +70,12 @@
 		if ( keyCode < 33 || keyCode > 40 )
 			return ;
+		
+		var blockEmptyStop = function( node )
+		{
+			if ( node.nodeType != 1 )
+				return false ;
+			var tag = node.tagName.toLowerCase() ;
+			return ( FCKListsLib.BlockElements[tag] || FCKListsLib.EmptyElements[tag] ) ;
+		}
 
 		var moveCursor = function()
@@ -79,5 +87,5 @@
 
 			var node = range.endContainer ;
-			
+
 			// only perform the patched behavior if we're at the end of a text node.
 			if ( node.nodeType != 3 )
@@ -96,5 +104,5 @@
 			// 	- if the DFS has scanned all nodes under my parent, then go the next step.
 			//	- if there is a text node after me but still under my parent, then do nothing and return.
-			var nextTextNode = FCKTools.GetNextTextNode( node, node.parentNode ) ;
+			var nextTextNode = FCKTools.GetNextTextNode( node, node.parentNode, blockEmptyStop ) ;
 			if ( nextTextNode )
 				return ;
@@ -103,5 +111,5 @@
 			range = FCK.EditorDocument.createRange() ;
 
-			nextTextNode = FCKTools.GetNextTextNode( node, node.parentNode.parentNode ) ;
+			nextTextNode = FCKTools.GetNextTextNode( node, node.parentNode.parentNode, blockEmptyStop ) ;
 			if ( nextTextNode )
 			{
@@ -115,5 +123,10 @@
 			{
 				// no suitable next siblings under our grandparent! what to do next?
-				node = node.parentNode ;
+				while ( node.parentNode 
+					&& node == node.parentNode.lastChild 
+					&& ( ! FCKListsLib.BlockElements[node.parentNode.tagName.toLowerCase()] ) )
+					node = node.parentNode ;
+			
+
 				if ( FCKListsLib.BlockElements[ parentTag ] 
 						|| FCKListsLib.EmptyElements[ parentTag ]
Index: /FCKeditor/trunk/editor/_source/internals/fcktools.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fcktools.js	(revision 597)
+++ /FCKeditor/trunk/editor/_source/internals/fcktools.js	(revision 598)
@@ -535,9 +535,15 @@
 }
 
-FCKTools.GetNextTextNode = function( textnode, limitNode )
+FCKTools.GetNextTextNode = function( textnode, limitNode, checkStop )
 {
 	node = this.GetNextNode( textnode, limitNode ) ;
+	if ( checkStop && node && checkStop( node ) )
+		return null ;
 	while ( node && node.nodeType != 3 )
+	{
 		node = this.GetNextNode( node, limitNode ) ;
+		if ( checkStop && node && checkStop( node ) )
+			return null ;
+	}
 	return node ;
 }
