uno icon indicating copy to clipboard operation
uno copied to clipboard

[Skia] ScrollViewer.ViewChanged is fired before content is scrolled (i.e. with outdated offsets)

Open ramezgerges opened this issue 6 months ago • 5 comments

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

ramezgerges avatar May 28 '25 23:05 ramezgerges

cc. @dr1rrb @jeromelaban

ramezgerges avatar May 28 '25 23:05 ramezgerges

If it's about the composition animation, then it will impact:

  1. Mouse wheel scrolling
  2. 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 :)

dr1rrb avatar May 29 '25 13:05 dr1rrb

Actually this has probably a major impact on the ItemsRepeater when fast scrolling mouse-wheel!

dr1rrb avatar May 29 '25 14:05 dr1rrb

Could this be related to this https://github.com/unoplatform/uno/issues/20637?

HakanL avatar May 30 '25 15:05 HakanL

The issue occurs on HD as well

Image

jhanvi03 avatar Jun 12 '25 17:06 jhanvi03

@ajpinedam what is the status on this issue, please?

Jen-Uno avatar Jul 04 '25 17:07 Jen-Uno

@Jen-Uno Pushed draft PR with the fix. Working on the RuntimeTests.

ajpinedam avatar Jul 04 '25 20:07 ajpinedam

Issue is fixed Tested with: Templates/SDK: 6.2.7 Platform(s): Desktop, Wasm IDE: VS 2022 - 17.14.9 OS: Windows

khaskoul avatar Aug 11 '25 18:08 khaskoul