Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS. Auto-sized Grid row containing ScrollView sizes itself to the full height requested by the ScrollView content. #15085

Closed
Keflon opened this issue May 15, 2023 · 4 comments
Labels
Milestone

Comments

@Keflon
Copy link

Keflon commented May 15, 2023

Description

iOS only.
Given the following xaml:

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="MauiGridScrollBug.MainPage">

    <Grid RowDefinitions="*,*">
        <ScrollView Grid.Row="0">
            <Button HeightRequest="600" Text="Top Button" Margin="5"/>
        </ScrollView>
        <ScrollView Grid.Row="1">
            <Button HeightRequest="600" Text="Bottom Button" Margin="5"/>
        </ScrollView>
    </Grid>
</ContentPage>

Expected result is a ContentPage with 2 equally sized Grid rows.

image

Actual result

On iOS, the grid rows expand to the size of their ScrollView Content.
image

Steps to Reproduce

  1. File->New MAUI app
  2. Replace the MainPage content with this:
<Grid RowDefinitions="*,*">
    <ScrollView Grid.Row="0">
        <Button HeightRequest="600" Text="Top Button" Margin="5"/>
    </ScrollView>
    <ScrollView Grid.Row="1">
        <Button HeightRequest="600" Text="Bottom Button" Margin="5"/>
    </ScrollView>
</Grid>
  1. Remove the click-handler in MainPage.xaml.cs

Run the app on iOS.

Link to public reproduction project repository

https://github.com/Keflon/MauiGridScrollBug

Version with bug

7.0 (current)

Last version that worked well

6.0.424

Affected platforms

iOS

Affected platform versions

iOS 16.4. Probably others.

Did you find any workaround?

Do not use 'Auto' in RowDefinitions.
Do not use '*' in RowDefinitions.

Note: This did work fine. I didn't notice the update that broke it but it was a recent one.

Relevant log output

No response

@rmarinho
Copy link
Member

Hey @hartez does this look something that might be fixed recently ?

@Keflon on the workaround section you say "Do not use 'Auto' in RowDefinitions." but in the example your are using start (*).

@ghost
Copy link

ghost commented May 15, 2023

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@Keflon
Copy link
Author

Keflon commented May 15, 2023

Hey @hartez does this look something that might be fixed recently ?

@Keflon on the workaround section you say "Do not use 'Auto' in RowDefinitions." but in the example your are using start (*).

Well spotted! I've updated it to "Do not use '*' in RowDefinitions."

@Eilon Eilon added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label May 15, 2023
@samhouts
Copy link
Member

Duplicate of #15079

@samhouts samhouts marked this as a duplicate of #15079 May 15, 2023
@samhouts samhouts closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jun 14, 2023
@Eilon Eilon removed the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label May 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants