bug(drag-drop): Item not always restored to initial index when using cdkDropListSortingDisabled on connected lists
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
### Is this a regression?
- [ ] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
_No response_
### Description
Dragging an item from its original drop list to another one then dragging it back to the original drop list isn't always restored to its initial index.
### Reproduction
StackBlitz: https://stackblitz.com/edit/angular-1ra8a1?file=src/app/cdk-drag-drop-disabled-sorting-example.html
Steps to reproduce:
1. Drag any item item from the top container to the bottom one (without dropping) and drag it back to the top container
2. Observer that the item gets re-added at its original index in the top container
3. Drag any item but the first from the bottom container to the top one (without dropping) and drag it back to the bottom container
### Expected Behavior
Item re-added to the bottom container at its original index.
### Actual Behavior
Item re-added to the bottom container at an index lower than its original.
### Environment
- Angular: 15.0.4
- CDK/Material: 15.0.3
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOS
Guía de contribución
Línea de trabajo
Comienza con la reproducción en el StackBlitz enlazado, particularmente en src/app/cdk-drag-drop-disabled-sorting-example.html, y verifica si el índice cambia al mover elementos entre listas conectadas sin soltarlos. Sigue el manejo de CDK drag-drop para la ordenación deshabilitada y confirma la finalización cuando un elemento vuelve a su lista original en su índice original.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- frontend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100