uno
uno copied to clipboard
[Desktop] ScrollView content visible outside the scroll area.
Discussed in https://github.com/unoplatform/uno/discussions/18289
Originally posted by @mcNets September 24, 2024:
Working in my last app I noticed that sometimes the content of a ScrollView or part of the content, in this case just the Border, is visible outside the scroll area.
I'm using a FeedView where the NormalTemplate has a GridView inside a ScrollView.
How to reproduce
Download the attached solution and execute the desktop project, then scroll up the content by clicking the small arrow at the bottom of the scrollbar. The card's border is visible outside the scroll area.
In my application it happens scrolling the content using the scrollbar no matter where, in this one, at least in my computer only by clicking the bottom arrow.
@agneszitte -> On my side, I am not able to reproduce the issue at all.
@Xiaoy312 Was able to reproduce the issue on his side.
Here are additional details for the repro steps for him: repro: page-up/down, mouse wheel scroll no-repro: dragging scrollbar, arrow-up/down
His comment:
The problem is related to the
CornerRadius, if you remove the CornerRadius from MachinesItemNormalTemplate the issue is no longer reproducible.
Likely Skia-specific, we would need to review the implementation of BorderVisual with CornerRadius which is a skia-specific feature
@Xiaoy312 can reproduce the issue with Uno.Sdk 5.3.108 and also with Uno.Sdk 5.4.5 or latest 5.5.0-dev
Is it because of this?
https://github.com/unoplatform/uno/blob/dc047075b75cc9a7ad02c16f385324e21f7e512d/src/Uno.UI.Composition/Composition/BorderVisual.skia.cs#L173-L185
@mcNets Can you confirm that you are still able to reproduce the issue 100% of the time with this sample app (by clicking the small down arrow of the scrollbar) even with the latest Uno.Sdk 5.4.5 please? (5.4 migration notes for info)
At the moment @Xiaoy312 is the only one that is able to reproduce the issue, but the repro is a little bit different (by using mouse wheel scroll).
I can't repro at all on my side. It's extremely weird that different ways of scrolling affect the repro differently. The final vertical offset is all that should matter.
@agneszitte yes I can. I updated to 5.4.5 and still happening. In fact in my actual project I'm on "Uno.Sdk": "5.5.0-dev.62".
It disappears when I set BorderThicknes=0 even if there is a CornerRadius > 0.
@agneszitte yes I can. I updated to 5.4.5 and still happening. In fact in my actual project I'm on
"Uno.Sdk": "5.5.0-dev.62".It disappears when I set
BorderThicknes=0even if there is a CornerRadius > 0.
Thank you a lot for the feedback @mcNets, we will continue to investigate (cc @jeromelaban for info)
@agneszitte / @jeromelaban can we get this prioritised as it's affecting a lot of scenarios where scrolling happens. The workaround seems to be setting a background on the panel where the bleed through is showing but ideally this shouldn't be happening
@nickrandolph We had trouble reproducing this when it was first opened. If you have an alternative repro, please post it as well, maybe it will be more reproducible.
@nickrandolph @ramezgerges Here another minimum example built with 5.4.10. I used mouse wheel to scroll the content.
https://github.com/user-attachments/assets/deecc966-165b-45f7-a105-741c7508acf1
@mcNets Unfortunately, I still can't reproduce. (sidenote: I modified the uno.sdk version to 5.5.0-dev.90 because I already had it restored, but it won't matter.)
https://github.com/user-attachments/assets/f3866990-99b6-4e4c-8816-75a6cfc35e22
Could you try setting the SkiaSharpVersion msbuild property to 3.0.0-preview.4.1? I discovered a few Linux-only skia bugs related to clipping a while ago and they were fixed in the skia version used in SkiaSharp 3. Maybe a similar bug is specific to your environment and is also fixed in SkiaSharp3.
@ramezgerges 👍
By adding <SkiaSharpVersion>3.0.0-preview.4.1</SkiaSharpVersion> to the project it works fine with 5.4.10 and 5.5.0-dev.90
@ramezgerges what is left to be done for this issue please?
@agneszitte What's left is moving Uno to SkiaSharp 3 :D