bug(tabs / mat-tab-group): Open dialog with component mat-tab-group and fast change mat-tab (click another mat-tab) and empty content
- Ngôn ngữ chính
- TypeScript
- Star
- 25k
- Fork
- 6.8k
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 91
Mô tả
### 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với bản tái hiện StackBlitz được liên kết và kiểm thử mat-dialog-container chứa mat-tab-group, bao gồm việc chuyển nhanh sang một mat-tab khác. Theo dõi hành vi hiển thị tab trong khi mở hộp thoại; được xem là hoàn tất khi tab vừa được chọn luôn hiển thị nội dung của nó một cách nhất quán đối với thao tác chạm, chuột và các cú nhấp được thực hiện bằng script.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, typescript
- Lĩnh vực
- frontend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100