[Bug] ScrollView nested inside StackLayout causes ScrollView to measure incorrectly
See original GitHub issueDescription
If you have the following structure
SL => ScrollView => SL => Content
The ScrollView measures out as the entire height of the content and is not scrollable on Android (haven’t tested iOS)
Steps to Reproduce
I’ve added my XAML file here
It’s basically this
<VerticalStackLayout>
<ScrollView Padding="{OnPlatform iOS='30,60,30,30', Default='30'}">
<VerticalStackLayout>
<!-- add a bunch of content here -->
</VerticalStackLayout>
</ScrollView>
</VerticalStackLayout>
Expected Behavior
The content should be scrollable
Actual Behavior
The content isn’t scrollable
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
NestedScrollView could not scroll with match_parent ...
Reason for that is that if the scrollview's child is the same size as the scrollview itself (both match_parent for height) it means...
Read more >ScrollView not scrolling in .net MAUI
I created below code with ScrollView in .NET MAUI, when trying to scroll nothing happens. Any help would be appreciated. <ContentPage.Content> < ...
Read more >ScrollView - .NET MAUI
In this scenario, the ScrollView causes the StackLayout to be as tall as the sum of the heights of its children. Then the...
Read more >RecyclerView within NestedScrollView Scrolling Issue
Now what kinda problem occurred when we used nestedScrollView and put recyclerView inside nestedScrollView , it scrolls at various speeds depending on gestures....
Read more >Common bugs in React Native ScrollView and how to fix ...
The first and most common mistake of using ScrollView is not knowing when to use it. There are two common List components in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You would be correct on all of those statements.
@reepmeDeveloper This happens when the contents of the
ScrollView
is smaller (shorter) than the space provided by the outerStackLayout
. I think if you put a fixed size on theScrollView
or put some other children in the outerStackLayout
that reduce the height available for theScrollView
, it will scroll.