Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 3913)
+++ /CKEditor/trunk/CHANGES.html	(revision 3914)
@@ -144,5 +144,6 @@
 		<li><a href="http://dev.fckeditor.net/ticket/3953">#3953</a> : Fixed keystroke for close Paste dialog.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/3951">#3951</a> : Reset size and lock ratio options were not accessible in Image dialog.</li>
-		<li><a href="http://dev.fckeditor.net/ticket/3921">#3921</a> : Fixed Container scroll issue on IE7.</li>		
+		<li><a href="http://dev.fckeditor.net/ticket/3921">#3921</a> : Fixed Container scroll issue on IE7.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/3940">#3940</a> : Fixed list operation doesn't stop at table.</li>
 	</ul>
 	<h3>
Index: /CKEditor/trunk/_source/core/dom/node.js
===================================================================
--- /CKEditor/trunk/_source/core/dom/node.js	(revision 3913)
+++ /CKEditor/trunk/_source/core/dom/node.js	(revision 3914)
@@ -395,5 +395,5 @@
 		},
 
-		getParents : function()
+		getParents : function( closerFirst )
 		{
 			var node = this;
@@ -402,5 +402,5 @@
 			do
 			{
-				parents.unshift( node );
+				parents[  closerFirst ? 'push' : 'unshift' ]( node );
 			}
 			while ( ( node = node.getParent() ) )
Index: /CKEditor/trunk/_source/plugins/indent/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/indent/plugin.js	(revision 3913)
+++ /CKEditor/trunk/_source/plugins/indent/plugin.js	(revision 3914)
@@ -117,5 +117,5 @@
 		// possible about the surrounding lists, we need to feed it the further
 		// ancestor node that is still a list.
-		var listParents = listNode.getParents();
+		var listParents = listNode.getParents( true );
 		for ( var i = 0 ; i < listParents.length ; i++ )
 		{
Index: /CKEditor/trunk/_source/plugins/list/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/list/plugin.js	(revision 3913)
+++ /CKEditor/trunk/_source/plugins/list/plugin.js	(revision 3914)
@@ -178,7 +178,12 @@
 	function onSelectionChange( evt )
 	{
-		var elements = evt.data.path.elements;
-
-		for ( var i = 0 ; i < elements.length ; i++ )
+		var path = evt.data.path,
+			blockLimit = path.blockLimit,
+			elements = path.elements,
+			element;
+
+		// Grouping should only happen under blockLimit.(#3940).
+		for ( var i = 0 ; i < elements.length && ( element = elements[ i ] )
+			  && !element.equals( blockLimit ); i++ )
 		{
 			if ( listNodeNames[ elements[i].getName() ] )
@@ -424,10 +429,11 @@
 						listNode = null,
 						processedFlag = false,
-						blockLimit = path.blockLimit;
+						blockLimit = path.blockLimit,
+						element;
 
 					// First, try to group by a list ancestor.
-					for ( var i = 0 ; i < path.elements.length ; i++ )
-					{
-						var element = path.elements[i];
+					for ( var i = 0 ; i < path.elements.length &&
+						  ( element = path.elements[ i ] ) && !element.equals( blockLimit ); i++ )
+					{
 						if ( listNodeNames[ element.getName() ] )
 						{
