--- misc/tabledrag.js Tue Sep 16 23:59:39 2008 +++ misc/tabledrag.js Mon Dec 22 12:48:12 2008 @@ -941,9 +941,14 @@ minIndent = nextRow ? $('.indentation', nextRow).size() : 0; // Maximum indentation: - if (!prevRow || $(this.element).is('.tabledrag-root')) { + if (!prevRow || ($(prevRow).is('.tabledrag-leaf') && !$('.indentation', prevRow).size() < $('.indentation', this.element).size())) { // Do not indent the first row in the table or 'root' rows.. - maxIndent = 0; + if (!prevRow) { + maxIndent = 0; + } + else { + maxIndent = $('.indentation', prevRow).size(); + } } else { // Do not go deeper than as a child of the previous row.