-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Collections do not scroll items into view within the browser viewport with keyboard #2766
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
Labels
Comments
majornista
added a commit
that referenced
this issue
Jan 21, 2022
…owser viewport Add IntersectionObserver to detect whether or not a focused item is visible within the browser window, and if not scroll it into view.
5 tasks
majornista
added a commit
that referenced
this issue
Jan 21, 2022
jest does not recognize IntersectionObserver.
majornista
added a commit
that referenced
this issue
Jan 24, 2022
majornista
added a commit
that referenced
this issue
Feb 12, 2022
majornista
added a commit
that referenced
this issue
Feb 14, 2022
Update focusSafely method to account for focusing an element safely after a pointer event on another element.
majornista
added a commit
that referenced
this issue
Feb 24, 2022
…owser viewport Add IntersectionObserver to detect whether or not a focused item is visible within the browser window, and if not scroll it into view.
majornista
added a commit
that referenced
this issue
Feb 24, 2022
jest does not recognize IntersectionObserver.
majornista
added a commit
that referenced
this issue
Feb 24, 2022
majornista
added a commit
that referenced
this issue
Feb 24, 2022
majornista
added a commit
that referenced
this issue
Feb 24, 2022
Update focusSafely method to account for focusing an element safely after a pointer event on another element.
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Uh oh!
There was an error while loading. Please reload this page.
🐛 Bug Report
When the bounds of a virtualized collection extend beyond the browser viewport, and setting focus to an item within the collection that is out of view, the browser will not scroll the focused item into view.
🤔 Expected Behavior
An item receiving focus in a virtualized collection should not only scroll the item into view within the collection, but it should scroll the item into view within the browser as well.
😯 Current Behavior
document.body
to bring the focused Item into view.💁 Possible Solution
Add the following to
useVirtualizer
method in@react-aria/virtualizer/src/Virtualizer.tsx
:Then at the end of the
onFocus
method, add the following after updatingisFocusWithin.current
:🔦 Context
This bug was reported by a team using a static TableView that noticed when the TableView was larger than the browser viewport, focusing a row would not cause the browser to scroll it into view.
💻 Code Sample
🌍 Your Environment
🧢 Your Company/Team
Adobe/Accessibility Adobe/Admin_Console
🕷 Tracking Issue (optional)
Jira issue A11Y-5009 and TRON-8092
The text was updated successfully, but these errors were encountered: