maui icon indicating copy to clipboard operation
maui copied to clipboard

[iOS][MacCatalyst] ScrollView's size is not being recalculated, when the size of content changes

Open Alex-Dobrynin opened this issue 6 months ago • 3 comments

Description

I have ScrollView with MaxHeightRequest set to some value and VerticalOptions set to Start. ScrollView has VerticalStackLayout, which has few expanders. When user expands expanders the size of scrollview remains as initial showing only headers of expanders.

On Android this works well

Steps to Reproduce

No response

Link to public reproduction project repository

ScrollViewRepro.zip

Version with bug

8.0.7 SR2

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, MacCatalyst

Affected platform versions

No response

Did you find any workaround?

yes. You need to extend scroll view, override OnPropertyChanged event and check ContentSizeProperty. then just call InvalidateMeasure();

Relevant log output

No response

Alex-Dobrynin avatar Feb 14 '24 14:02 Alex-Dobrynin

Hi @Alex-Dobrynin. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost avatar Feb 15 '24 19:02 ghost

This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

ghost avatar Feb 19 '24 20:02 ghost

@PureWeen This is reproduction project ScrollViewRepro.zip

Alex-Dobrynin avatar Feb 20 '24 10:02 Alex-Dobrynin

Verified this on VS 17.10.0 Preview 2.0(8.0.10). Repro on iOS 17.2 and MacCatalyst, not repro on Windows 11, Android 14.0-API34 with provided project.

XamlTest avatar Mar 20 '24 08:03 XamlTest