bug(drag-drop): changing the disable state dynamically doesn't work
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
#### Reproduction
For some reason, in Stackblitz it works: https://stackblitz.com/edit/angular-ghqzcr
But in a new project, the bug also reproduces: https://github.com/doronsever/drag-drop-bug
I copied everything from stackblitz to my project and still doesn't work.
I need the initiate state of the drag and drop to be disabled and only when clicking on the mouse down to enable it.
The reason for that is that I have also a resize option and if the drag and drop is enabled, when resizing it is also dragging the element.
So in my real app, I'm starting with the drag and drop disabled, and on a mousedown event, I check if the mouse is not touching the resize button and only then enabling the drag and drop.
Up until Angular 8, everything worked fine but now that we are trying to upgrade to Angular 9 (and also material to 9, this behavior stopped working).
#### Expected Behavior
When setting the flag to false, enable the dragging even if the mouse is down.
#### Actual Behavior
drag and drop doesn't work
#### Environment
- Angular: 9.1.1
- CDK/Material: 9.2.0
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Mac
Guía de contribución
Línea de trabajo
Empieza comparando la reproducción de StackBlitz con la reproducción enlazada de new-project, centrándote en la configuración de drag-and-drop de Angular CDK y en el flag disabled dinámico. Reproduce el comportamiento de Angular 9.1.1/Material 9.2.0 en Chrome y verifica después que el arrastre se puede habilitar durante mousedown, mientras que al cambiar el tamaño no se inicia un arrastre.
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
- 35/100