bug(menu): Overflow behaviour does not match the documentation
- 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
14
### Description
The behaviour when a menu button label has a long work (that can't be broken) is different in a newly created app than on the Angular Material demo page.
The `overflow: hidden` on `.mdc-list-item__primary-text` appears to be missing.
Material documentation page edited to make the label longer:

App that copies the same code:

### Reproduction
Steps to reproduce:
1. https://components-issue-5kgmsj.stackblitz.io (this is a copy of the code from the `basic menu` example but with a long label)
2. click to open the menu
3. the label overflows the content instead of getting an ellipsis
### Expected Behavior
Ellipsis
### Actual Behavior
Overflows
### Environment
- Angular: 15.2.3
- CDK/Material: 15.2.3
- Browser(s): all
- Operating System (e.g. Windows, macOS, Ubuntu): mac
Contributor guide
Research direction
Start with the Angular Material menu implementation and its styles, searching for `.mdc-list-item__primary-text` and the basic menu example referenced in the report. Reproduce the long, unbreakable label in the linked StackBlitz app and compare it with the documentation demo. Done means the label is clipped with an ellipsis rather than overflowing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- Half a day
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100