Skip to content

fix: avoid virtualizer losing scroll position on large size change#11256

Merged
tomivirkki merged 2 commits intomainfrom
fix/virtualizer-avoid-losing-scroll-adjustment-on-size-change
Mar 6, 2026
Merged

fix: avoid virtualizer losing scroll position on large size change#11256
tomivirkki merged 2 commits intomainfrom
fix/virtualizer-avoid-losing-scroll-adjustment-on-size-change

Conversation

@tomivirkki
Copy link
Copy Markdown
Member

@tomivirkki tomivirkki commented Mar 5, 2026

Description

Properly restore the scroll position (not only the the first visible index, but also scroll offset) also on virtual index adjust.

Fixes #7237

This will also enable a couple of virtualizer tests that are currently skipped

Type of change

Bugfix

@tomivirkki tomivirkki force-pushed the fix/virtualizer-avoid-losing-scroll-adjustment-on-size-change branch from 896df50 to 3691611 Compare March 6, 2026 06:40
@tomivirkki tomivirkki marked this pull request as draft March 6, 2026 06:45
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Mar 6, 2026

@tomivirkki tomivirkki marked this pull request as ready for review March 6, 2026 07:28
@tomivirkki tomivirkki requested a review from vursen March 6, 2026 07:28
@vursen
Copy link
Copy Markdown
Contributor

vursen commented Mar 6, 2026

I guess this PR should fix #7237.

Copy link
Copy Markdown
Contributor

@vursen vursen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work fine!

@tomivirkki tomivirkki merged commit a123bea into main Mar 6, 2026
10 checks passed
@tomivirkki tomivirkki deleted the fix/virtualizer-avoid-losing-scroll-adjustment-on-size-change branch March 6, 2026 10:19
web-padawan pushed a commit that referenced this pull request Mar 6, 2026
…11256) (#11271)

Co-authored-by: Tomi Virkki <tomivirkki@users.noreply.github.com>
@vaadin-bot
Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 25.1.0-beta3.

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.

[virtualizer] Scroll offset is not always restored after size change

4 participants