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:1 Changed 11 years ago by jbicks

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:

http://jsfiddle.net/We8SM/8/

Version 1, edited 11 years ago by jbicks (previous) (next) (diff)

comment:2 Changed 10 years ago by Scott González

Milestone: TBD2.0.0

comment:3 Changed 10 years ago by mikesherov

Resolution: worksforme
Status: newclosed

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.