angular / angular/components

matTooltip jumps in conjuction with cdk-virtual-scroll-viewport

Aperta
#15,648 2 commenti 10 reazioni 0 assegnatari Vedi su GitHub
area: cdk/scrolling area: material/tooltip P3
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

#### What is the expected behavior?
The tooltip should remain in place when the target is replaced.

#### What is the current behavior?
The tooltip jumps to the bottom of the page.

#### What are the steps to reproduce?
There are 2 lists rendered (refreshed at 2 seconds), the bug can be seen in the first one:
- hover over the first item from the first list; you'll notice the tooltip jumps to the bottom of the page

If you hover over the first item in the second list it behaves correctly.
The second list has `templateCacheSize: 0`

https://stackblitz.com/edit/virtual-scroll-bug?file=src%2Fapp%2Fapp.component.html

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 7.2.11 (latest)
Material 7.3.6 (latest)
OS: macOS Mojave 10.14.3

![scrollbug](https://user-images.githubusercontent.com/235319/55224895-16ffc900-521a-11e9-92de-b5787dc103f9.gif)

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dalla riproduzione StackBlitz collegata, in particolare da src/app/app.component.html, e confronta i due elenchi cdk-virtual-scroll-viewport e le relative impostazioni di templateCacheSize. Riproduci l’aggiornamento di due secondi mentre passi il mouse sul primo elemento; il lavoro è completato quando matTooltip rimane al suo posto quando la sua destinazione viene sostituita, invece di saltare in fondo alla pagina.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.