uno
uno copied to clipboard
[Skia] ScrollViewer.ViewChanged is fired before content is scrolled (i.e. with outdated offsets)
Current behavior
Related to https://github.com/unoplatform/uno-private/issues/1291
Due to the way ScrollViewer scrolling currently wortks (with composition animations), we start the scrolling animation and fire ViewChanged before the animation has ended, leading to any offset values read on the Visual of the content of the ScrollViewer to be outdated, most notably when calling TransformToVisual on the content of the ScrollViewer.
Expected behavior
No response
How to reproduce it (as minimally and precisely as possible)
No response
Workaround
No response
Works on UWP/WinUI
None
Environment
No response
NuGet package version(s)
No response
Renderer
- [ ] Skia
- [ ] Native
Affected platforms
No response
IDE
No response
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
No response
cc. @dr1rrb @jeromelaban
If it's about the composition animation, then it will impact:
- Mouse wheel scrolling
- Programmatic
ChangeView
The second doesn't seems really problematic IMO, but the first is quite important. The good point is that we have better control on it :)
Actually this has probably a major impact on the ItemsRepeater when fast scrolling mouse-wheel!
Could this be related to this https://github.com/unoplatform/uno/issues/20637?
The issue occurs on HD as well
@ajpinedam what is the status on this issue, please?
@Jen-Uno Pushed draft PR with the fix. Working on the RuntimeTests.
Issue is fixed Tested with: Templates/SDK: 6.2.7 Platform(s): Desktop, Wasm IDE: VS 2022 - 17.14.9 OS: Windows