-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Autocomplete] Fix hidden items during keyboard navigation #19305
[Autocomplete] Fix hidden items during keyboard navigation #19305
Conversation
While scrolling up with the keyboard, position the top part of the option so that the both the group label and the row are fully visible. No changes were made for the scroll down behaviour, which already handled skipping the group label. Doesn't interfere with the current behaviour of autoselects without groups. The 1.3 ratio was selected through visual inspection, and is the value that minimizes misaligments and/or cropping of the topmost option.
Details of bundle changes.Comparing: f1080b6...0671abb
|
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.
Could you slow down the GIF? I can't see any difference.
Would it be possible to send keystrokes to the element before taking a visual regression snapshot, for example?
I don't know of any and wouldn't spend too much time on it. At some point I want to improve how we do visual regression tests. So far they are good enough.
Sure!
Issue on the first one:
Issues on the second one:
|
@aisamu Thank you! |
@oliviertassinari oh, don't mention it! With all the hand holding and a suggestion that took it almost all the way, you're the one that should be thanked 😄 |
This PR implements @oliviertassinari's suggestion for #19217 with a couple tweaks
The differences were mainly to preserve the existing behaviour on lists without groups and on the downward scrolling of lists with groups.
While scrolling up with the keyboard, position the top part of the
option so that the both the group label and the row are fully visible.
No changes were made for the scroll down behaviour, which already
handled skipping the group label.
Doesn't interfere with the current behaviour of autoselects without
groups.
The 1.3 ratio was selected through visual inspection, and is the value
that minimizes misaligments and/or cropping of the topmost option.
Fixes #19217
Some guidance is definitely needed on how to test this behaviour given its dynamic nature. Would it be possible to send keystrokes to the element before taking a visual regression snapshot, for example?