bug(Tooltip): Prevents touch scrolling
- 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
Duplicate of (closed) https://github.com/angular/components/issues/4892
`MatTooltip` triggers with `matTooltipTouchGestures` set to `auto` (default) or `on` break page scrolling on touch devices. When set to either of these values the directive sets `touch-action: none` on the trigger, which breaks native page scrolling.
On a page with many tooltip triggers (e.g. dense links) it can be difficult to scroll the page at all.
Setting `matTooltipTouchGestures` to `off` fixes scrolling, but makes tooltips inaccessible on touch devices.
### Reproduction
Reproduction taken from https://github.com/angular/components/issues/4892#issuecomment-832516128
Steps to reproduce:
1. Open https://stackblitz.com/edit/angular-ylctyk on a touch device (phone, touch laptop) in Chrome
2. Scroll the page by initiating a touch on the white background
3. Attempt to scroll the page by initiating a touch on the black box
### Expected Behavior
Page scrolls
### Actual Behavior
Page does not scroll
### Environment
- Angular: Latest Google-internal version
- CDK/Material: Latest Google-internal version
- Browser(s): Chrome 104
- Operating System (e.g. Windows, macOS, Ubuntu): Android
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con la direttiva MatTooltip e riproduci il problema usando l’esempio StackBlitz collegato su un dispositivo touch Android in Chrome 104. La correzione è completata quando la pagina scorre dopo un tocco su un trigger del tooltip, mentre i tooltip touch rimangono disponibili; verifica sia l’impostazione default o auto sia on.
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
- 42/100