Closed
Description
Reproduction
StackBlitz: https://stackblitz.com/edit/angular-wfrzq9
Steps to reproduce:
- Switch 'child a' and 'child b'
- Directly switching a and b will fail
- Workaraound in the example: Drag child b after Parent_2 and drag it again into the list before child a
Expected Behavior
Dragging within the inner cdkDropList should work, the outher cdkDropList should only fire if the element is moved out of its list.
Actual Behavior
The inner cdkDropList does listen to the drag - the outer list is called.
might be caused by
components/src/cdk/drag-drop/directives/drop-list.ts 304:
ref.connectedTo(siblings.filter(drop => drop && drop !== this).map(list => list._dropListRef))
Environment
- Angular: 9.0.0
- CDK/Material: 9.0.0
- Browser(s): Chrome 80.0.3987.87
- Operating System (e.g. Windows, macOS, Ubuntu): Win 10