Closed
Description
Reproduction
No special setup is needed, the "bug" can be reproduced even on the https://material.angular.io/cdk/drag-drop/overview site.
Expected Behavior
I expect an item to be swapped downwards if I drag another item towards its top (and the same for all directions).
(When using nested drop lists, I would even expect an item not to move till I get to the bottom of its nested drop list.)
Actual Behavior
Item's are swapped unrelated WHERE the cursor is over them,
and taking the mouse movement direction change into account in a way that is not always correct.
Environment
- Angular: 9+
- CDK/Material: 9.2.1
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOS
Suggestion
- Providing a sorting callback property for drop lists, so developers can handle custom sorting scenarios.
- Or making the built in sorting function more universal (even working with nested drop lists, without moving the parent item prematurely, etc.)