[Sortable] Disabled Indexes can be dragged into (but not out of).
I'm submitting a...
- Regression report (used to work in 1.1.1, appeared after upgrading to 2.0.1)
- Bug report (cannot find a similar issue)
Current behavior
In a Sortable with disabledIndexes set, a disabled item can be replaced by dragging a non-disabled item over it. This allows an item to swap with the disabled item and then "get stuck", as the previously enabled item is now at a disabled index and cannot be dragged out.
Previously, a Disabled Item acted as a stationary element, and the "swapping" behavior of Sortable items would skip over a disabled item in the middle of a Sortable list. Currently, these items now act as "glue", trapping items being dragged over them. They can be swapped out with other items, but this is not exactly ideal or smooth behavior.
Expected behavior
Items should not be able to be dragged into disabled indexes. For example, if index 1 is disabled, dragging an item from index 0 should "skip over" index 1 and swap with the item at index 2.
Minimal reproduction of the problem with instructions
Simply drag Item 0 over Item 1 with the intent of skipping over it. Item 0 will swap with the supposedly disabled Item 1, and will then become "stuck" as that is now in the disabled index. For comparison, drag Items 2 and 3 over each other.
This bug is reproducible on Telerik's documentation site. My example is simply a stripped down version of the example for Disabled Items at Telerik's Kendo UI for Angular - Sortable documentation page. This behavior exists in the documentation example as well.
Environment
Browser:
- Chrome (desktop) version 71.0.3578.98 (Official Build) (64-bit)
- Edge version 25.10586.0.0
Hi there, it's been a little while since I've asked about this issue. Any updates?
Moving items into disabled slots can be prevented in dataMove event.
See: https://stackblitz.com/edit/angular-uzc1t9. This is a modified version of a Kendo example from their documentation.
In this example, items can not be moved our of or into index 0 and 2
This behavior was originally reported over 5 years ago and has not received significant demand or follow-up from the community since then. Considering this and the availability of a workaround, we are unable to prioritize it over more impactful and widely requested improvements.
If this limitation is still affecting your scenario, please share additional context or use cases. This will help us better assess the severity and reconsider prioritization in the future. Thank you!