-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scrollIntoViewport: improve scrolling behavior for elements with multiple scrollable parents #6187
Conversation
Build successful! 🎉 |
Build successful! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with a variety of components (menu w/ sections, virtualized/non virtualized lists, tabs, calendar, etc) and things seems be scrolled into view properly.
Build successful! 🎉 |
Build successful! 🎉 |
## API Changes
unknown top level export { type: 'any' } @react-aria/utilsuseFormReset-
+getScrollParents {
+ node: Element
+ checkForOverflow?: boolean
+ returnVal: undefined
+} |
Closes #5696
✅ Pull Request Checklist:
📝 Test Instructions:
In the new story, open the menu and keyboard navigate all the way down to invoke scrolling. The focused key should stay in view as you keep navigating down.
I've added this same example to a stackblitz without this fix, so you can see the original issue. We didn't have any stories that made this easy to reproduce without making your window height very small.
🧢 Your Project:
RSP