bug(tabs / mat-tab-group): Open dialog with component mat-tab-group and fast change mat-tab (click another mat-tab) and empty content
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### 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
If I open a dialog in which I have a mat-tab-group component and quickly click on another tab (another mat-tab), the content of the newly opened tab is not rendered - it remains empty. It looks right in DOM.
There are several ways to quickly change a tab:
1. By touch
2. Click the mouse
3. By entering the click command in the console: document.evaluate('//html[1]/body[1]/div[1]/div[2]/div[1]/mat-dialog-container[1]/dialog-data-example-dialog[1]/div[1]/mat-tab-group[1]/mat-tab-header[1]/div[1]/div[1]/div[1]/div[2]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.click()
Fast click on tab after dialog open - bug

Slow click on tab after dialog open - correct

### Reproduction
Steps to reproduce:
1. https://stackblitz.com/edit/angular-k1g4u3-pmsayf
### Expected Behavior
Correctly loaded content of the newly selected tab
### Actual Behavior
The empty content of the newly selected tab
### Environment
- Angular: 14.0.0
- CDK/Material: 14.0.4
- Browser(s): Google Chrome 103.0.5060.66
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Beitragsleitfaden
Rechercherichtung
Beginne mit der verknüpften StackBlitz-Reproduktion und teste den mat-dialog-container mit mat-tab-group, einschließlich eines schnellen Wechsels zu einem anderen mat-tab. Verfolge das Rendering-Verhalten der Tabs während des Öffnens des Dialogs; abgeschlossen ist die Untersuchung, wenn der neu ausgewählte Tab seinen Inhalt bei Touch-, Maus- und skriptgesteuerten Klicks konsistent anzeigt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100