Index: /FCKeditor/trunk/_whatsnew.html
===================================================================
--- /FCKeditor/trunk/_whatsnew.html	(revision 2273)
+++ /FCKeditor/trunk/_whatsnew.html	(revision 2274)
@@ -106,4 +106,6 @@
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2368">#2368</a>] Fixed broken protect 
 			source logic for comments in IE.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2387">#2387</a>] Fixed JavaScript
+			with list commands when the editable document is selected with Ctrl-A.</li>
 	</ul>
 	<p>
Index: /FCKeditor/trunk/editor/_source/classes/fckdomrangeiterator.js
===================================================================
--- /FCKeditor/trunk/editor/_source/classes/fckdomrangeiterator.js	(revision 2273)
+++ /FCKeditor/trunk/editor/_source/classes/fckdomrangeiterator.js	(revision 2274)
@@ -137,5 +137,5 @@
 						// point. (#1717)
 						if ( nodeName != 'br' )
-							this._NextNode = currentNode ;
+							this._NextNode = FCKDomTools.GetNextSourceNode( currentNode, true, null, lastNode ) ;
 					}
 
