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] Grid cannot be scrolled properly in a scroll view #7373

Closed
Deepak1799 opened this issue May 20, 2022 · 6 comments · Fixed by #13415
Closed

[iOS] Grid cannot be scrolled properly in a scroll view #7373

Deepak1799 opened this issue May 20, 2022 · 6 comments · Fixed by #13415
Assignees
Labels
area-controls-scrollview ScrollView fixed-in-8.0.0-preview.2.7871 Look for this fix in 8.0.0-preview.2.7871! platform/iOS 🍎 s/needs-info Issue needs more info from the author s/try-latest-version Please try to reproduce the potential issue on the latest public version s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@Deepak1799
Copy link

Description

I have a grid inside the scroll view. When I try to scroll to the bottom of the grid using the "ScrollToAsync", the content (grid) is hiding without scrolling to the bottom.

Steps to Reproduce

  1. Create a File -> New MaUI App.
  2. Use a scroll view.
  3. Add a grid inside the scroll view with some bigger size than the scroll view (to make the view scrollable).
        <ScrollView HeightRequest="800" x:Name="MyScrollView" WidthRequest="600" BackgroundColor="Red">
            <Grid x:Name="MyGrid" HeightRequest="1600" BackgroundColor="Yellow" 
              WidthRequest="1200"/>
        </ScrollView>
  1. Try to scroll to the bottom programmatically in a button click and you could see the grid disappearing.
    await MyScrollView.ScrollToAsync(1200,1600,true);

Expected Behavior: Content should not disappear and the it should scroll to the bottom.

Repro project is attached here:
MauiApp1.zip

Version with bug

Release Candidate 3 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 15.5

Did you find any workaround?

No

Relevant log output

NA.
@Deepak1799 Deepak1799 added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels May 20, 2022
@Eilon Eilon added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label May 20, 2022
@kristinx0211 kristinx0211 added s/verified Verified / Reproducible Issue ready for Engineering Triage and removed s/needs-verification Indicates that this issue needs initial verification before further triage will happen labels May 23, 2022
@kristinx0211
Copy link

can be reproduced on IOS with above project.

@hartez hartez added the area-controls-scrollview ScrollView label Oct 9, 2022
@HobDev
Copy link

HobDev commented Dec 31, 2022

I have the same issue with VerticalStackLayout. The ScrollVieew does not scroll to the bottom. The upper Content is visible but the Page does not scroll to the last element. Hence the last element in the UI remains hidden. This is a bug on iOS.

@hartez hartez moved this to Todo in MAUI SDK Ongoing Feb 6, 2023
@rmarinho rmarinho self-assigned this Feb 10, 2023
@rmarinho rmarinho moved this from Todo to In Progress in MAUI SDK Ongoing Feb 16, 2023
@rmarinho
Copy link
Member

Looking at the sample, you can't put a ScrollView inside a VerticalStackLayout.. VerticalStackLayout will stretch to fit the contents, so it will make the ScrollView stretch and not be scrollable.

Can you try something like this see if you still see the issue?

   <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>

        </Grid.RowDefinitions>
        <Button Text="Scroll To Bottom" Clicked="Button_Clicked" />
        <ScrollView Grid.Row="1" x:Name="MyScrollView" BackgroundColor="Red">
            <Grid x:Name="MyGrid" HeightRequest="1600" BackgroundColor="Yellow" 
              WidthRequest="1200">
                <Label Text="Hello" TextColor="White" VerticalOptions="End" Background="Blue"/>
            </Grid>
        </ScrollView>
    </Grid>
    ```

@rmarinho rmarinho added the s/needs-info Issue needs more info from the author label Feb 16, 2023
@ghost
Copy link

ghost commented Feb 16, 2023

Hi @Deepak1799. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. 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.

@rmarinho rmarinho added the s/try-latest-version Please try to reproduce the potential issue on the latest public version label Feb 16, 2023
@ghost
Copy link

ghost commented Feb 16, 2023

Hi @Deepak1799. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

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 ghost added the s/no-recent-activity Issue has had no recent activity label Feb 20, 2023
@ghost
Copy link

ghost commented Feb 20, 2023

This issue has been automatically marked as stale because it has been marked as requiring author feedback 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 ghost closed this as completed Feb 23, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in MAUI SDK Ongoing Feb 23, 2023
@samhouts samhouts added the fixed-in-8.0.0-preview.2.7871 Look for this fix in 8.0.0-preview.2.7871! label Mar 16, 2023
@ghost ghost removed the s/no-recent-activity Issue has had no recent activity label Mar 16, 2023
@samhouts samhouts added this to the 8.0-preview2 milestone Mar 16, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Apr 21, 2023
@Eilon Eilon removed the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label May 14, 2024
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-scrollview ScrollView fixed-in-8.0.0-preview.2.7871 Look for this fix in 8.0.0-preview.2.7871! platform/iOS 🍎 s/needs-info Issue needs more info from the author s/try-latest-version Please try to reproduce the potential issue on the latest public version s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants