Sortable: Cannot open selects when using "filter"

Created on 12 Jun 2019  路  3Comments  路  Source: SortableJS/Sortable

Problem:

When using filter option to restrict dragging certain items, it prevents being able to open selects etc within that item.

I suspect this is because it intercepts the mousedown event and does some kind of preventDefault.

sortable-filter-prob

JSBin/JSFiddle demonstrating the problem:

https://ysoqe.codesandbox.io/
https://codesandbox.io/embed/naughty-dust-ysoqe?fontsize=14

Most helpful comment

It stops preventDefault from being called when the drag is filtered out. It isn't false by default because previous maintainer wanted to keep backwards compatibility.

All 3 comments

Try setting the preventOnFilter option to false.

That works! Thanks a lot Owen. Out of interest what does that option actually do? Is there a reason why it's not enabled by default?

It stops preventDefault from being called when the drag is filtered out. It isn't false by default because previous maintainer wanted to keep backwards compatibility.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jkrasnay picture jkrasnay  路  3Comments

Webifi picture Webifi  路  3Comments

dwburdick picture dwburdick  路  3Comments

binitghetiya picture binitghetiya  路  4Comments

kinjal-codes picture kinjal-codes  路  3Comments