adobe / adobe/spectrum-web-components

[Bug]: sp-menu is scrolling automatically when the cursor is placed at the bottom of the list

Open
#5,618 1 comment 0 reactions 0 assignees View on GitHub
bug SEV 4 triage
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

![Image](https://github.com/user-attachments/assets/222ea5c1-be99-4f36-a669-1dccb4ceaa0d)
![Image](https://github.com/user-attachments/assets/a6e64c48-56df-4559-97ac-22d82643434c)

### 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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.