Drag and drop acts weird, sometimes not resetting the parent, or even clearing the region value

Created on 4 October 2019, about 5 years ago
Updated 31 October 2023, about 1 year ago

So one problem with drag and drop is that if you move a field or a field group outside a group above the group, the parent is not reset to none. It seems to happen only if you move it to the top of the table.

To reproduce

  1. Create a tabs group and put it on top of the table
  2. Create a tab group and nest this underneath
  3. Nest a field, say the body, under the tab and save
  4. Now drag the body to the top of the table, in the root. Then hit 'Show row weights'. The parent will still be the first tab

Note: after some tests, a simple single group, say details, is good enough to to reproduce this bug! See the small video underneath to see how to reproduce it.

It looks like that is fixed in 🐛 TableDrag JS :first-of-type issues Needs work .

Other things:

  • Tabs also sometimes act weird.
  • I was able to get to a state as well where no region value was set for a field, becoming empty.

Not sure yet how to reproduce these two consistently, will document more when I can.

So this seems like a core problem. But let's see if we can we fix this ourselves as this makes it very tedious to drag and drop groups in general. If you comment out line 332 of includes/field_ui.inc (the library), you hit the same bugs.

🐛 Bug report
Status

Needs review

Version

3.0

Component

Miscellaneous

Created by

🇧🇪Belgium swentel

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024