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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yched’s picture

FileSize
1.83 KB

Updated 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.

yched’s picture

FileSize
1.73 KB

rerolled after commit of http://drupal.org/node/200370

yched’s picture

FileSize
1.76 KB

Previous patch removed the wrong element (the table cell itself...) after doing its tests.

Robin Monks’s picture

Status: Needs review » Reviewed & tested by the community

Patch works for 7.x with minor offset, looks good. Is there a good grueling testcase for this as well?

Robin

yched’s picture

Example :
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.

Gábor Hojtsy’s picture

Version: 6.x-dev » 7.x-dev

Committed 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.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Done. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

yang_yi_cn’s picture

Version: 7.x-dev » 6.10
Status: Closed (fixed) » Active

I'm getting the following js error

$(".indentation", testCell).get(1) is undefined

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?

yang_yi_cn’s picture

Status: Active » Closed (fixed)

Sloved. 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.