Search and Top Navigation
#7734 closed bug (fixed)
Opened September 23, 2011 01:33AM UTC
Closed August 23, 2014 07:11PM UTC
Last modified August 23, 2014 07:11PM UTC
Draggable: HTML IDs are removed when dragging to a Sortable
Reported by: | azaozz | Owned by: | mikesherov |
---|---|---|---|
Priority: | minor | Milestone: | 1.11.2 |
Component: | ui.draggable | Version: | 1.8.13 |
Keywords: | Cc: | scottgonzalez | |
Blocked by: | Blocking: |
Description
This was introduced in #4564 as a bug fix but seems to cause more problems than it fixes.
The patch removes the ID from the draggable element (but doesn't remove the IDs from any child elements) preventing proper handling of that element when it's dropped in the sortable. This breaks the Widgets page in WordPress among other things.
Furthermore this patch doesn't solve the problem of duplicate IDs. If there are child elements with IDs, they still create duplicates.
The solution imho would be to revert that patch, then update the documentation on using both draggable + sortable together. The draggable elements should be without IDs or the author should handle the duplicate IDs.
(Would have set the ticket type as regression if it was available.)
Attachments (0)
Change History (9)
Changed September 23, 2011 02:44AM UTC by comment:1
Changed October 11, 2012 02:49PM UTC by comment:2
milestone: | 1.9.0 → 2.0.0 |
---|
Changed October 27, 2012 07:17PM UTC by comment:3
cc: | → scott.gonzalez |
---|
Not sure whether this is something we intend on fixing. Scott, can you chime in here on the issue... mark as open if we're going to tackle this, or resolve as wontfix if we're not. Thanks!
Changed October 27, 2012 07:17PM UTC by comment:4
summary: | HTML IDs are removed when dragging an item from a Draggable to a Sortable → Draggable: HTML IDs are removed when dragging to a Sortable |
---|
Changed October 28, 2012 09:20PM UTC by comment:5
type: | bug → feature |
---|
Changed October 29, 2012 12:55AM UTC by comment:6
status: | new → open |
---|---|
type: | feature → bug |
This seems legit, I'd even say bug was correct since this is expected behavior and was implemented for a long time. I haven't dug into the code to figure out why clones are always used when connecting to sortables, but I can't think of any reason that should be necessary.
Changed August 22, 2014 09:42PM UTC by comment:7
milestone: | 2.0.0 → none |
---|---|
owner: | → mikesherov |
status: | open → assigned |
Changed August 23, 2014 07:11PM UTC by comment:8
resolution: | → fixed |
---|---|
status: | assigned → closed |
Draggable: No cloning in connectToSortable and ensure correct position
Draggables now forcefully recalculate their position when dragged out
of a sortable. Sortables now override draggable position when a
draggable is dragged into it. Lastly, no longer remove sortable helper
when dragging a draggable out, which allows us to not use a clone.
Fixes #7734
Fixes #8809
Closes gh-1322
Changeset: 95546c5d045f8055b121f24d3e35468e2a570c1b
Changed August 23, 2014 07:11PM UTC by comment:9
milestone: | none → 1.11.2 |
---|
Related ticket on WprdPress' trac: https://core.trac.wordpress.org/ticket/17952