Sortable icon indicating copy to clipboard operation
Sortable copied to clipboard

Multidrag: Prevent deselect on click

Open twilson90 opened this issue 4 years ago • 3 comments

I have a sortable with MultiDrag enabled. I have 2 buttons 'Add' and 'Remove' I want to be able to select multiple items and then click 'Remove', to remove the selected items, however as soon as I click on the Remove button, before my click handler runs the items are deselected. I generally just want my selected items to remain selected when I click outside the draggable context. How do I do it?

twilson90 avatar Mar 18 '20 19:03 twilson90

same issue. hoping to get support or an API for it.

chrisyeung1121 avatar Sep 30 '20 10:09 chrisyeung1121

Do you have any workaround for this?

nikkii94 avatar Dec 07 '20 16:12 nikkii94

duplicate of #1612

The solution looks to be to prevent the deselect early using this code snippet: https://github.com/SortableJS/Sortable/issues/1612#issuecomment-533777362

mnelson4 avatar Jul 09 '21 16:07 mnelson4