Opened 13 years ago
Closed 10 years ago
#4993 closed bug (worksforme)
ui.sortable option helper (clone) doesn't work
Reported by: | flos | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 2.0.0 |
Component: | ui.sortable | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$('sth').sortable ({
helper: 'clone'
});
seems not to work. There is no cloned helper to drag.
Change History (3)
comment:2 Changed 10 years ago by
Milestone: | TBD → 2.0.0 |
---|
comment:3 Changed 10 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Thanks for taking the time to contribute to the jQuery UI project! I can no longer reproduce the issue using the latest jQuery and jQuery UI. http://jsfiddle.net/3Ck4R/
If you can still reproduce it, please feel free to reply to this ticket with a test case showing the problem. Thanks!
Note: See
TracTickets for help on using
tickets.
I ran into this issue as well and realized in order to get the desired behavior I needed to use a draggable in conjunction with a sortable. The draggable is responsible for "cloning" the item. Since you can't really sort a list if you are "cloning" the item, I understand why sortable doesn't support "cloning".
In my example (see link below) when you drag an item from the top list to the bottom list, the element in the top remains there. But when you are sorting the top list the item is first cloned and then removed immediately. I put my code on jsFiddle:
http://jsfiddle.net/We8SM/8/