You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like @grokys is the expert in this area. Steven, do you think there could be a simple fix for this issue?
I understand that the term simple & virtualization are not best friends though... 😂
Describe the bug
This is a regression b/w 0.10.22 .. 11.2.3.
Seems that the selected item is cached (in _focusedElement) and is not recycled as regular items that leave the viewport.
Avalonia/src/Avalonia.Controls/VirtualizingStackPanel.cs
Lines 224 to 232 in 8fe22dc
Then in VirtualizingStackPanel.Arrange(), the cached item is also arranged but with incorrectly calculated finalSize.
Avalonia/src/Avalonia.Controls/VirtualizingStackPanel.cs
Lines 648 to 651 in 8fe22dc
The calculation currently just averages the desired height of the realized containers, that only works fine when using identical item height values.
To Reproduce
Check the following repro apps to see the different behavior in Avalonia 0.10.22 vs 11.2.3.
There's also a WPF app here that works as expected.
https://github.com/tvass83/AvaloniaIssues/tree/main/InvalidBoundsForSelectedItem
Expected behavior
The selected item shall not randomly appear on screen while scrolling through the items.
Avalonia version
11.2.3
OS
No response
Additional context
Considered the following issues & PRs before filing this issue:
#9269
#2144
#10367
#17349
#10892
The text was updated successfully, but these errors were encountered: