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.
There's a shift between the 'grid' used to determine the x-indentation on mouse-dragging and the actual width of indentations.
Can be seen when dealing with deep nested items :
- item 1
- item 2
- item 3
- item 4
- item 5
The more you move item 5 away from it's original indentation, the more you see indent positions fall further from your mouse.
That's because when computing the 'width' of the indentation, we take only the css width, and overlook padding and margins.
Attached patch fixes that.
Comment | File | Size | Author |
---|---|---|---|
#3 | tabledrag_xindent.patch | 1.76 KB | yched |
#2 | tabledrag_xindent.patch | 1.73 KB | yched |
#1 | tabledrag_xindent.patch | 1.83 KB | yched |
tabledrag_xindent.patch | 1.69 KB | yched | |
Comments
Comment #1
yched CreditAttribution: yched commentedUpdated as per quicksketch idea on IRC : to be even more accurate about the css our test indents receive, we create them directly in the table.
Comment #2
yched CreditAttribution: yched commentedrerolled after commit of http://drupal.org/node/200370
Comment #3
yched CreditAttribution: yched commentedPrevious patch removed the wrong element (the table cell itself...) after doing its tests.
Comment #4
Robin Monks CreditAttribution: Robin Monks commentedPatch works for 7.x with minor offset, looks good. Is there a good grueling testcase for this as well?
Robin
Comment #5
yched CreditAttribution: yched commentedExample :
A CCK text field, 'filtered text', multiple values unlimited.
on node edit form, unfold the 'input format' fieldset, or resize the textfield for one of the values
try reordering the values.
Comment #6
Gábor HojtsyCommitted to 6.x with
cvs commit -m "#201799 by yched, quicksketch: compute identation width for draggables better, counting on padding and margin as well as measuring the width at the place where it is used (taking possible CSS overrides into account)"
Let's get it to 7.x as well.
Comment #7
webchickDone. Thanks!
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #9
yang_yi_cn CreditAttribution: yang_yi_cn commentedI'm getting the following js error
When I was on Content Type > Manage Fields.
And all the JS effect are broken by this error.
I'm using Drupal 6.10, CCK 2.1, with fieldgroup enabled.
Is there anybody can help me?
Comment #10
yang_yi_cn CreditAttribution: yang_yi_cn commentedSloved. Actually my problem, I used form_alter in one of my module to unset $form['attachments'] for all forms, which causes on content-field-overview form, there is a empty field, which is not displayed and causing JS error.