Skip to content

How to distinguish drag for reorder from drag&drop to outside element #2003

Answered by owen-m1
crystalfp asked this question in Q&A
Discussion options

You must be logged in to vote

If you do:

new Sortable({
    onMove: function (evt, originalEvent) {
        return false; // Return false to cancel sorting
    },
})

And in the onMove function you can check if CTRL is down or something in the originalEvent parameter

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@crystalfp
Comment options

@crystalfp
Comment options

Answer selected by crystalfp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants