Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 3849)
+++ /CKEditor/trunk/CHANGES.html	(revision 3850)
@@ -114,4 +114,6 @@
 		<li><a href="http://dev.fckeditor.net/ticket/3870">#3870</a> : The empty paragraph 
 			desappears when hitting ENTER after &quot;New Page&quot;.</li>
+ 		<li><a href="http://dev.fckeditor.net/ticket/3887">#3887</a> : Fixed an issue in which the create
+ 			list command may leak outside of a selected table cell and into the rest of document.</li>
 	</ul>
 	<h3>
Index: /CKEditor/trunk/_source/plugins/domiterator/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/domiterator/plugin.js	(revision 3849)
+++ /CKEditor/trunk/_source/plugins/domiterator/plugin.js	(revision 3850)
@@ -62,4 +62,21 @@
 				var lastNode = walker.previous();
 				this._.lastNode = lastNode.getNextSourceNode( true );
+
+				if ( this._.lastNode.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tool.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.
+					var testRange = new CKEDITOR.dom.range( range.document );
+					testRange.moveToPosition( this._.lastNode, CKEDITOR.POSITION_AFTER_END );
+					if ( testRange.checkEndOfBlock() )
+					{
+						var path = new CKEDITOR.dom.elementPath( testRange.endContainer );
+						var block = path.block || path.blockLimit;
+						this._.lastNode = block.getNextSourceNode( true );
+					}
+				}
+
 				// Probably the document end is reached, we need a marker node.
 				if ( !this._.lastNode )
@@ -68,4 +85,5 @@
 						this._.lastNode.insertAfter( lastNode );
 				}
+
 				// Let's reuse this variable.
 				range = null;
