[Bug]: Scroll-jumping behavior in picker menus on hover
Code of conduct
- [x] I agree to follow this project's code of conduct.
Impacted component(s)
sp-picker, sp-menu
Expected behavior
When hovering over an
Actual behavior
When activating the
Screenshots
https://github.com/user-attachments/assets/a8f7524f-b0d4-4883-b7a8-e5df0f510007
https://github.com/user-attachments/assets/7ba3ec82-08c7-45e0-921f-cc2cc11373ea
What browsers are you seeing the problem in?
Chrome
How can we reproduce this issue?
The issue can be reproduced in this Storybook story (see attached video): https://opensource.adobe.com/spectrum-web-components/storybook/index.html?path=/story/picker--custom
Anecdotally, this seems to happen more often when a menu item that would otherwise be hidden by overflow is selected.
Screen recording the same behavior in our app (Firefly Boards)
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!
This request came from the Firefly team, Kyle Schaeffer. He should be included on the Jira ticket.
I have been able to reproduce this bug in our production documentation.
This seems to be expected behaviour. In your first screen recording "Nebraska" is half way visible. Your cursor briefly hovers the menu item which triggers a focus event. That event scrolls "Nebraska" into view. See: https://github.com/adobe/spectrum-web-components/blob/main/packages/menu/src/MenuItem.ts#L749-L753
I can have another look and open a PR, if this is not expected
SWC-1080. Let's review the comment left by @LucidityDesign as part of this work.