VerticalStackLayout inside Scrollview: Button at the bottom not clickable on IOS
See original GitHub issueDescription
When you put a VerticalStackLayout inside a ScrollView and load some data dynamically (i.e. some Text using an async function) and then put a button on the end of the VerticalStackLayout, the Button-Handler never gets called. This works on Android without any problem. For me related to: #8820
Steps to Reproduce
- Clone the repo
- Run the app on IOS
- Click on the “Button at bottom” Button
- Scroll to the bottom of the page and try to click the button
Link to public reproduction project repository
https://github.com/FM1973/RefreshGridRepo.git
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 14.x +
Did you find any workaround?
Yes, there is a workaround. It´s the same as before having the general ScrollView-problem stated in #8820 Look there: https://github.com/dotnet/maui/issues/8820#issuecomment-1352923013
Relevant log output
-
Issue Analytics
- State:
- Created 6 months ago
- Reactions:5
- Comments:35 (8 by maintainers)
Top Results From Across the Web
Button can't be clicked in iOS and MacCatalyst where is ...
1 Answer 1 · Fixed in .Net 8 Preview: iOS ScrollView ContentSize (content beyond screen). · That also fixes Button at the bottom...
Read more >IOS ScrollView add children views ,bottom button will out of ...
IOS ScrollView add children views ,bottom button will out of screen,then scroll back to screen, but button will not work?
Read more >Maui nested Scrollview does not scroll : r/dotnetMAUI
Today's challenge is figuring out why the Scrollview is not working as expected. It not only does not work as it did in...
Read more >Margin not working with ScrollView - Microsoft Q&A
But the Button hiding behind the ScrollView and no matter how much I set the Bottom Margin o f the ScrollView it will...
Read more >Button not working in UIScrollView | Apple Developer Forums
I have button inside a view inside a scroll view. The button does not work. How can I get the button to work?...
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
@hartez Please correct me if I am wrong but when you say “This is fixed by https://github.com/dotnet/maui/pull/14176.” can people on .net 7 expect these fixes? As .net 8 isn’t released is it fair to say these are fixed. Running into this a lot where issues are raised in current .net 7 and fixed for .net 8 which is a little frustrating.
Maybe we could avoid using “its fixed”, until a PR is raised against .net 7. I feel I am going to have to upgrade to .net 8 to get all these fixes but then is it the same again when we encounter problems… Fixed in .net 9 Preview X?
Thanks
The InvalidateMeasure workaround does still work for me as of 7.0.81 for this particular issue.
To be clear, I use code similar to the following in my code-behind:
XAML
However, it would be ideal if this were not necessary.