You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a sortable item selection is done programmatically using Sortable.utils.select() and Sortable.utils.deselect(), implicit deselection due to an outside click event does not occur if an item is not selected without these utilities beforehand.
Additionally, an utility-based selection also removes any prior hand-made selection.
These utilities also do not make use of the dispatchEvent function employed by onSelect and onDeselect.
Sortable.utils.select()
andSortable.utils.deselect()
, implicit deselection due to an outside click event does not occur if an item is not selected without these utilities beforehand.These issues are reproducible in this Codepen.
Implicit deselection
The proper behavior can be restored by vanilla selecting an item:
Util selection override
Versions
sortablejs = ^1.15.0
@types/sortablejs = ^1.13.0
Note The Codepen example linked above uses the complete Sortable source from #2181 but the described behavior is unchanged from ^1.15.0.
The text was updated successfully, but these errors were encountered: