Skip to content

multiDragKey option does not work #1833

Open
@AJB99

Description

@AJB99

Describe the bug
I'm using the following configuration for my Sortable instance:

const sortable = new Sortable($tree, {
    group : {
        name : 'ui-tree-sortable'
    },
    sort : true,
    direction: 'vertical',
    delay : 0,
    animation : 207,
    multiDrag : true,
    multiDragKey : 'ctrl'
    invertSwap : false,
    swapThreshold : 0.45,
    emptyInsertThreshold : 5,
    forceFallback : true,
    fallbackOnBody : true,
    fallbackTolerance : 3,
    dragClass : 'ui-tree-item-sortable-drag',
    fallbackClass : 'ui-tree-item-sortable-drag',
    selectedClass : 'ui-tree-item-sortable-selected',
    ghostClass : 'ui-tree-item-sortable-placeholder'
}

This prevents multiple items from being selected with a single-click, but it does not allow for multiple items to be selected when holding down the CTRL key and clicking on an unselected item.

Interestingly, SHIFT + click performs a range select as expected (but not advertised).

To Reproduce
See above.

Expected behavior
It should allow me to "cherry-pick" items in the list by holding down the CNTL key and clicking on an item.

Information
sortablejs = 1.10.2
Safari = 13.1
Chrome = 81.0
Vue.js = 2.6

Thanks in advance for any help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions