bug(MatGroupTabs): MatTabBody content within a MatMenu does not display
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 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
MatTab content in a mat menu will disappear when opening and closing the menu and transitioning between tabs. I believe the animations set the visibility to hidden; however, it will get in a state where it thinks it should be hidden even though the tab is highlighted causing the tab label to be the only thing visible.
### Reproduction
StackBlitz link: https://stackblitz.com/edit/ewu1na?file=src%2Fexample%2Fmenu-overview-example.html
Steps to reproduce:
1. Open Mat Menu
2. Select Second Tab
3. Click outside of MatMenu to close menu
4. Open menu and rapidly select either tab (may have to repeat steps 1-4). The key is to rapidly click the tabs, the content will disappear and will not come back until a few transitions. I think the animation is hiding it and never triggering it to display
### Expected Behavior
I expect tab content to be visible when a tab is in view and selected.
### Actual Behavior
Tab content is hidden tab content should be visible
### Environment
- Angular: 16.03
- CDK/Material: 16
- Browser(s): Edge
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Contributor guide
Research direction
Start with the linked StackBlitz reproduction and follow the MatGroupTabs/MatTabBody behavior inside MatMenu while rapidly switching tabs and reopening the menu. Investigate the transition state that leaves selected tab content hidden; done means selected content remains visible after repeated close, reopen, and tab-switch cycles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100