Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 3925)
+++ /CKEditor/trunk/CHANGES.html	(revision 3926)
@@ -148,4 +148,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/3891">#3891</a> : [IE] Fixed 'automatic' font color doesn't work.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/3972">#3972</a> : Fixed unable to remove a single empty list in document in Firefox with enterMode=BR.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/3973">#3973</a> : Fixed list creation error at the end of document.</li>
 	</ul>
 	<h3>
Index: /CKEditor/trunk/_source/plugins/domiterator/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/domiterator/plugin.js	(revision 3925)
+++ /CKEditor/trunk/_source/plugins/domiterator/plugin.js	(revision 3926)
@@ -63,12 +63,12 @@
 				this._.lastNode = lastNode.getNextSourceNode( true );
 
+				// We may have an empty text node at the end of block due to [3770].
+				// If that node is the lastNode, it would cause our logic to leak to the
+				// next block.(#3887)
 				if ( this._.lastNode &&
 						this._.lastNode.type == CKEDITOR.NODE_TEXT &&
-						!CKEDITOR.tools.trim( this._.lastNode.getText( ) ) )
-				{
-					// Special case for #3887:
-					// We may have an empty text node at the end of block due to [3770].
-					// If that node is the lastNode, it would cause our logic to leak to the
-					// next block.
+						!CKEDITOR.tools.trim( this._.lastNode.getText( ) ) &&
+						this._.lastNode.getParent().isBlockBoundary() )
+				{
 					var testRange = new CKEDITOR.dom.range( range.document );
 					testRange.moveToPosition( this._.lastNode, CKEDITOR.POSITION_AFTER_END );
