-
Notifications
You must be signed in to change notification settings - Fork 83
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
fix: ensure focused month is visible when receiving focus #3219
Conversation
0b79702
to
5c825d6
Compare
5c825d6
to
c436092
Compare
59d11ff
to
1532c89
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Hi @vursen , this commit cannot be picked to 22.0 by this bot, can you take a look and pick it manually? |
Description
This PR fixes the bug where a month receiving focus by the keyboard or programmatically sometimes wasn't scrolled into the visible area of the calendar.
An investigation established that the bug is caused by the buffer offset that can be set with the
--vaadin-infinite-scroller-buffer-offset
CSS variable. This offset isn't taken into account by therevealDate
method which leads to computing an erroneously greater number of visible months when an offset is set and, as a result, scrolling doesn't happen. Worth noting that the buffer offset is a non-zero value in both Lumo and Material themes so both themes are affected.💡tip: When reviewing this PR, enable the "Hide whitespace" option to reduce the diff.
Fixes #1892
Type of change
Checklist