wip: enable keyboard scrolling in S2 Popover when content overflows#10091
Draft
yihuiliao wants to merge 3 commits into
Draft
wip: enable keyboard scrolling in S2 Popover when content overflows#10091yihuiliao wants to merge 3 commits into
yihuiliao wants to merge 3 commits into
Conversation
yihuiliao
commented
May 20, 2026
| default: 'elevated', | ||
| isArrowShown: 'none' | ||
| }, | ||
| outlineStyle: 'solid', |
Member
Author
There was a problem hiding this comment.
I'm not sure if there was reason we were using outline over borders. However, since overflow: auto was moved to the popover and not inner div, the outline was appearing on top of the scrollbar. Using border ensures that it appears underneath.
*ignore the squished image, i didn't want it take up too much space but you can see where the outline is
|
Build successful! 🎉 |
|
Build successful! 🎉 |
kylin791-sys
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5303
The original issue was for V3 but the same issue occurred in S2. We focus the Popover but it wasn't a scrollable region (only the inner div was), so if you hit any of the up/down arrow keys, the content wouldn't scroll. The only way to scroll content via keyboard was if there was a focusable item inside. We move
overflow: 'autoto the Popover so it is both focused + a scrollable region.My only concern is that this could potentially affect a lot of other components which rely on Popover. I've tested other components but might have missed something
Btw, I still need to run chromatic so this PR is not quite done yet...
✅ Pull Request Checklist:
📝 Test Instructions:
Test ComboBox, Menu, Picker, Popover in storybook when the content scrolls. Make sure styles haven't changed, no double scrollbars, scroll into view works
Compare S2 Storybook > Popover > Help Center. Previously, if the content scrolled and you pressed the down arrow key, nothing would happen. You would first need to tab into the region. Now, you should be able to press the down arrow key and the content should scroll.
🧢 Your Project: