Skip to content

With "draggable" option enabled, erratic behavior with items not immediately children of sortable #1892

Open
@dongfang

Description

@dongfang

I use bootstrap's lists, with some div's in lists to group items by a headline.
When using SortableJS on such a list, and I drag an item from a group in the list, sortableJS will drag the whole group. This can be reproduced by disabling draggable on line 16 in index.html, and trying to drag an item from the left list to the right.

I want to drag just single items, so I use draggable and add that class to each item (my example as sent).

Problem: Some items in groups can't be dragged. The 2 last items, which are in a group div and are thus not immediate children of

will not drag to the right.

If I change, in _prepareDragStart:

if (target && !dragEl && target.parentNode === el) {

to

if (target && !dragEl) {

then I can drag all.

bugreport.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionquestions from the community

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions