Skip to content
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: use Math.round to get correct scroller first index #8278

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

web-padawan
Copy link
Member

@web-padawan web-padawan commented Dec 5, 2024

Description

Fixes #1665

See #1665 (comment) for clarification.

Added a test that sets item height to 30.0001px - with the test setup, the first item should be 0 but with previous logic the item count is calculated incorrectly and the item text content becomes 1.

Type of change

  • Bugfix

Copy link

sonarqubecloud bot commented Dec 5, 2024

@web-padawan web-padawan marked this pull request as ready for review December 5, 2024 11:09
@web-padawan web-padawan changed the title fix: use Math.round to get correct scroller item count fix: use Math.round to get correct scroller first index Dec 5, 2024
@web-padawan web-padawan removed the request for review from tomivirkki December 5, 2024 13:02
@web-padawan web-padawan merged commit c233413 into main Dec 5, 2024
9 checks passed
@web-padawan web-padawan deleted the fix/scroller-round branch December 5, 2024 13:03
web-padawan added a commit that referenced this pull request Dec 5, 2024
Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
web-padawan added a commit that referenced this pull request Dec 5, 2024
Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
web-padawan added a commit that referenced this pull request Dec 6, 2024
Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[date-picker] Month duplication caused by font size
3 participants