bug(tabs / mat-tab-group): Open dialog with component mat-tab-group and fast change mat-tab (click another mat-tab) and empty content
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
### 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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction StackBlitz liée et testez le mat-dialog-container contenant mat-tab-group, notamment avec un changement rapide vers un autre mat-tab. Suivez le comportement du rendu des onglets lors de l’ouverture de la boîte de dialogue ; c’est terminé lorsque l’onglet nouvellement sélectionné affiche systématiquement son contenu pour les interactions tactiles, à la souris et les clics déclenchés par script.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100