bug(CdkDragDrop): reordering smaller against larger items produce flickering effect
- 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
When using CdkDragDrop for reordering items with different sizes (e.g. width for horizontal orientation) in a container with greater height then of the elements there is a flickering effects. CdkDragDrop moves larger item really quickly from one side to another.
Try to drag "Iron age" over empty space in container against some wider item (e.g. "Early modern period")
Example uses angular 12, but in angular 17 it works the same.
### Reproduction
StackBlitz link: https://stackblitz.com/edit/angular-fhqz1h?file=src%2Fapp%2Fcdk-drag-drop-horizontal-sorting-example.css,src%2Fapp%2Fcdk-drag-drop-horizontal-sorting-example.ts,src%2Fapp%2Fcdk-drag-drop-horizontal-sorting-example.html
### Expected Behavior
Reorder elements without flickering effects, as it is when reordering elements of the same size or when container is not larger (e.g. greater height for horizontal list).
### Actual Behavior
Larger element in the list that is reordered against moves fast from one side to another.
### Environment
- Angular: 12
- CDK/Material: 12
- Browser(s): any
- Operating System (e.g. Windows, macOS, Ubuntu): any
Guía de contribución
Línea de trabajo
Comienza ejecutando la reproducción enlazada de StackBlitz e inspecciona src/app/cdk-drag-drop-horizontal-sorting-example.css, .ts y .html. Reproduce el arrastre de “Iron age” sobre el espacio vacío frente a “Early modern period” y, a continuación, sigue el comportamiento de ordenación horizontal de CdkDragDrop. Se considera terminado cuando los elementos de distinto tamaño se reordenan sin parpadeos, de forma coherente con el comportamiento de los elementos del mismo tamaño y de los contenedores más cortos.
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
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100