Skip to content

Conversation

@Artur-
Copy link
Member

@Artur- Artur- commented Sep 30, 2025

The VirtualList connector was initializing lastRequestedRange to [0, 0], causing an unnecessary viewport range update on first render. This update would reload list items, destroying any focused elements and causing focus loss.

Changed initialization to null to properly detect the first request and avoid spurious updates that interfere with focus management in master-detail views.

Fixes the issue where focusing the first item only worked on the second attempt due to the list being unnecessarily reloaded on first render.

The VirtualList connector was initializing lastRequestedRange to [0, 0],
causing an unnecessary viewport range update on first render. This update
would reload list items, destroying any focused elements and causing focus loss.

Changed initialization to null to properly detect the first request and avoid
spurious updates that interfere with focus management in master-detail views.

Fixes the issue where focusing the first item only worked on the second
attempt due to the list being unnecessarily reloaded on first render.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@Artur- Artur- force-pushed the virtual-list-initial-range branch from cf2102b to ee6be33 Compare September 30, 2025 06:57
@Artur- Artur- requested a review from sissbruecker September 30, 2025 07:15
@sonarqubecloud
Copy link

Copy link
Contributor

@ugur-vaadin ugur-vaadin left a comment

Choose a reason for hiding this comment

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

It seems that the tests also pass without the fix. Also, the focus ring does not seem to be there after resetting the list.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants