bug(MatSlider): MatSliderThumb stays active after drag ending
- 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 you start dragging slider **MatSliderThumb** became active. Sometimes, it doesn't loose active state, when you ending dragging. It stays active even after click outside. Only way to 'release' it - drag it again.
Within this issue **dragStart** event is fired, but **dragEnd** not. Variable **_isActive** of MatSliderThumb stays true.
That leads to inconsistence of MatSliderThumb view (it looks as active all time) and **makes setting it's value programmatically impossible** (if you are trying to set Value from component).
Bug is not stable but can be easily reproduced at official doc examples.
Mostly occur, when dragging ends little lower than MatSliderThumb position.
https://github.com/user-attachments/assets/77b99e5e-5bb4-4a47-9442-d7a3fbd5e423
### Reproduction
StackBlitz link: https://stackblitz.com/edit/ikftbm?file=src%2Fexample%2Fslider-overview-example.html
Steps to reproduce:
1. Drag slider a little
2. Release on bottom side
### Expected Behavior
dragEnd should be fired each time when user actually ending it.
### Actual Behavior
Sometimes dragEnd event is not fired after actual dragging end.
### Environment
- Angular: 18
- CDK/Material: 18
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): MacOS
Guía de contribución
Línea de trabajo
Comienza con el manejo del arrastre de MatSliderThumb demostrado en el ejemplo de StackBlitz enlazado y reproduce el fallo arrastrando ligeramente y soltando en el lado inferior en Chrome. Rastrea los eventos dragStart y dragEnd y el estado _isActive durante la liberación del puntero. Se considera terminado cuando dragEnd se dispara para cada arrastre completado, el thumb ya no permanece activo y los cambios de valor programáticos funcionan después.
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
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 48/100