? tabledrag_cvsdiff.patch
Index: misc/tabledrag.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/tabledrag.js,v
retrieving revision 1.13.2.5
diff -u -p -r1.13.2.5 tabledrag.js
--- misc/tabledrag.js	18 Jun 2009 12:24:24 -0000	1.13.2.5
+++ misc/tabledrag.js	10 Aug 2010 02:42:56 -0000
@@ -621,7 +621,7 @@ Drupal.tableDrag.prototype.updateField =
     var sourceRow = changedRow;
     if ($(previousRow).is('.draggable') && $('.' + group, previousRow).length) {
       if (this.indentEnabled) {
-        if ($('.indentations', previousRow).size() == $('.indentations', changedRow)) {
+        if ($('.indentation', previousRow).size() == $('.indentation', changedRow).size()) {
           sourceRow = previousRow;
         }
       }
@@ -631,7 +631,7 @@ Drupal.tableDrag.prototype.updateField =
     }
     else if ($(nextRow).is('.draggable') && $('.' + group, nextRow).length) {
       if (this.indentEnabled) {
-        if ($('.indentations', nextRow).size() == $('.indentations', changedRow)) {
+        if ($('.indentation', nextRow).size() == $('.indentation', changedRow).size()) {
           sourceRow = nextRow;
         }
       }
@@ -657,7 +657,7 @@ Drupal.tableDrag.prototype.updateField =
       // Use the first row in the table as source, because it's garanteed to
       // be at the root level. Find the first item, then compare this row
       // against it as a sibling.
-      sourceRow = $('tr.draggable:first').get(0);
+      sourceRow = $($(changedRow).parents('table.tabledrag-processed').get(0)).find('tr.draggable:first');
       if (sourceRow == this.rowObject.element) {
         sourceRow = $(this.rowObject.group[this.rowObject.group.length - 1]).next('tr.draggable').get(0);
       }
