bug(MatSlider): MatSliderThumb stays active after drag ending
- 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
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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con la gestione del trascinamento di MatSliderThumb mostrata nell’esempio StackBlitz collegato e riproduci il problema trascinando leggermente e rilasciando sul lato inferiore in Chrome. Traccia gli eventi dragStart e dragEnd e lo stato _isActive durante il rilascio del puntatore. Il lavoro è completato quando dragEnd viene attivato per ogni trascinamento completato, il thumb non rimane più attivo e le modifiche programmatiche del valore funzionano successivamente.
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à
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100