spectrum-web-components
spectrum-web-components copied to clipboard
[Bug][Action Menu]: Menu expands when multiple menu-group items are added
Code of conduct
- [X] I agree to follow this project's code of conduct.
Impacted component(s)
sp-action-menu, sp-menu-group
Expected behavior
The menu items should stay the same size within the action menu picker.
Actual behavior
The menu body is expanding involuntarily. This seems to be a CSS bug. Applying a width is possible to the sp-menu, but not sp-action-menu.
From @Westbrook on Slack:
Seems like a bit of a CSS bug. Feel like
.spectrum-Menushould always be:display: inline-flex;flex-direction: column;
We're waiting to hear from Spectrum CSS on this. An override may be possible in the meantime.
Screenshots
One group:
Two groups:
Three groups:
Four groups:

Sample code that illustrates the problem
https://studio.webcomponents.dev/edit/5nCsOXATLs2T6Dw50Z5h/src/index.stories.js?p=stories