Opened 14 years ago

Closed 11 years ago

Last modified 10 years ago

#4857 closed bug (fixed)

Nested li's don't work properly with sortable.

Reported by: Eli Owned by:
Priority: major Milestone: 1.8.24
Component: ui.sortable Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description

Change History (9)

comment:1 Changed 14 years ago by andri

Unfortunately kae's last demo[1] from bug #4703 with jquery-ui-1.8a1 is indeed practically unusable because of the jerkiness. Often it does two jumps for each mouse stop, at first throwing the element to bottom of the root element, then to the inner list.

[1] http://verens.com/demos/nested-sortables/nested-sortables.html

comment:2 Changed 13 years ago by Jörn Zaefferer

Milestone: TBD1.8

comment:3 Changed 13 years ago by tonimahoni

I also had to connect nested sortable lists.

The first approach was to do like this:

$('.selector').sortable({

connectWith: '.selector', items: 'div'

})

=> this basically works but results in a jumpy behavior of the placeholder. Barely usable.

The second approach ist to do like this:

$('.selectorAAA').sortable({

connectWith: '[.selectorBBB, .selctorAAA]',

})

$('.selectorBBB').sortable({

connectWith: .selectorAAA, .selectorBBB?,

})

Actually this should result in a nested sortable list, where you can drag elements from the main list to the child lists, vice-versa, and between the child list. But this doesent work, as the placeholder does not appear when you drag elements from the main list to the child list and from the child list to the main list.

This second issue is described here pretty well: http://dl.dropbox.com/u/396448/JQueryUINestedListSorting.html

comment:4 Changed 11 years ago by rtwo

I fixed this issue and submitted a pull request on github.

https://github.com/jquery/jquery-ui/pull/555

comment:5 Changed 11 years ago by rtwo

Some examples by Burke Holland:

With unpatched jquery-ui: http://jsfiddle.net/burkeholland/AbUPM/4/light/

With a patched version of jquery-ui: http://jsfiddle.net/yPQZx/

comment:6 Changed 11 years ago by Martin Hoch

Resolution: fixed
Status: newclosed

Sortable: Fixed jerkiness with nested-sortables. Fixes #4857 - Nested lists don't work properly with sortable.

Changeset: 2b899cc8437c5bc16b60a01a51241e4096fd80db

comment:7 Changed 11 years ago by Martin Hoch

Sortable: Fixed jerkiness with nested-sortables. Fixes #4857 - Nested lists don't work properly with sortable. (cherry picked from commit 2b899cc8437c5bc16b60a01a51241e4096fd80db)

Changeset: a4ae3824893c085043122fd83d80723a08061ae2

comment:8 Changed 11 years ago by Scott González

Milestone: 1.9.01.8.24

comment:9 Changed 10 years ago by mikesherov

#4741 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.