adobe / adobe/spectrum-web-components
[Bug]: sp-menu is scrolling automatically when the cursor is placed at the bottom of the list
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 262
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 68
Description
### Code of conduct
- [x] I agree to follow this project's code of conduct.
### Impacted component(s)
sp-popover, sp-menu, sp-menu-item, sp-picker
### Library version
1.4.0 and latest
### Expected behavior
Hovering any items in the `sp-menu` list of options should not cause it to automatically scroll.
### Actual behavior
When hovering the last visible element from a `sp-menu`, the list automatically scrolls down. Same thing happens when the list is scrolled down and the user hovers over the first visible element in the list, it scrolls up. This is reproducible on all browsers.
### Screenshots


### What browsers are you seeing the problem in?
Firefox, Chrome, Safari, Microsoft Edge
### How can we reproduce this issue?
1. Go to https://opensource.adobe.com/spectrum-web-components/storybook/index.html?path=/story/picker--custom or https://opensource.adobe.com/spectrum-web-components/storybook/index.html?path=/story/menu--menu-group-selects
2. Open the menu with options (if necessary, the second link shared already has the menu open)
3. Hover over the last visible item
4. Observe how the list scrolls
5. If you hover over the first visible item now, the list will scroll up
### Sample code or abstract reproduction which illustrates the problem
_No response_
### Severity
SEV 4
### Logs taken while reproducing problem
_No response_
### Would you like to track this issue in Jira?
- [x] Yes, please tell me the ticket number!
Contributor guide
Research direction
Start by reproducing the behavior in the linked Storybook picker and menu-group-selects examples, then inspect the sp-menu, sp-menu-item, sp-popover, and sp-picker components involved. Done means hovering the first or last visible item no longer changes the menu scroll position across the reported browsers; add regression coverage if the repository provides a relevant test entry point.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100