Commit 759c2955 authored by Dries's avatar Dries
Browse files

- Patch #758514 by fago: second tabledrag table on a page sets wrong parent ids.

parent fa63e6fe
......@@ -640,7 +640,7 @@ Drupal.tableDrag.prototype.updateField = function (changedRow, group) {
// Use the first row in the table as source, because it's guaranteed 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 = $(this.table).find('tr.draggable:first').get(0);
if (sourceRow == this.rowObject.element) {
sourceRow = $(this.rowObject.group[this.rowObject.group.length - 1]).next('tr.draggable').get(0);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment