Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When dragging a group of table rows (e.g. in a hierarchical menu), the classes for "tree-child", "tree-child-first", and "tree-child-horizontal" are not added. This makes it so that the visual representation of the tree being dragged is not shown. The last class, "tree-child-last" actually continues to work.
Here's a screenshot *while dragging* an item. You can see the lack of tree indicators except for the last item (Views).
Proposed resolution
Fix the addition of classes in Drupal.tableDrag.prototype.row.prototype.findChildren().
Remaining tasks
Review and test.
User interface changes
None, other than fixing the functionality
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#1 | after.png | 59.07 KB | quicksketch |
#1 | before.png | 58.35 KB | quicksketch |
#1 | tabledrag-tree-child-2277785.patch | 1.65 KB | quicksketch |
Comments
Comment #1
quicksketchPatch attached. I also changed the variable "currentRow" to be "$currentRow", since it's a jQuery object. Since this is a variable scoped inside of .findChildren() it shouldn't have any other effect and just makes that function follow our variable naming pattern.
Attached before and after photos as well.
Comment #2
quicksketchComment #3
nod_Any chance you can change the
rowIndentation
signature so that it follows jQuery's wrong order for each() params instead of having to use this?rowIndentation(indentNum, el)
Comment #15
quietone CreditAttribution: quietone at PreviousNext commented@quicksketch, Thank you for reporting this problem and making a patch.. We rely on issue reports like this to improve Drupal core.
I tested this on 9.5.x, standard install, and was not able to reproduce this error.
Therefore, closing as outdated. If this is incorrect reopen the issue, by setting the status to 'Active', and add a comment explaining what still needs to be done.
Thanks!