bug(drag-drop): Item not always restored to initial index when using cdkDropListSortingDisabled on connected lists
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
### 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con la riproduzione nello StackBlitz collegato, in particolare in src/app/cdk-drag-drop-disabled-sorting-example.html, e verifica se l'indice cambia quando gli elementi vengono spostati tra liste connesse senza essere rilasciati. Traccia la gestione di CDK drag-drop per l'ordinamento disabilitato e conferma il completamento quando un elemento torna alla lista originale nella posizione originale.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- frontend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100