Changes between Version 1 and Version 2 of Ticket #4993, comment 1


Ignore:
Timestamp:
Jun 9, 2011, 4:45:06 PM (11 years ago)
Author:
jbicks
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4993, comment 1

    v1 v2  
    1 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 addition you need to remove the element if you are "sorting", so here i use the "isold" class to find and remove the old element.  In this example sortable2 is another div that I need to be able to drag into, so this probably would not be necessary in your case.  I put my code on jsFiddle:
     1I 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". 
     2
     3In 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:
    24
    35