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] MAUI ScrollView is not scrollable when Keyboard hides content #15159

Closed
ryanlpoconnell opened this issue May 18, 2023 · 2 comments
Closed
Labels
area-controls-scrollview ScrollView platform/iOS 🍎 s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working

Comments

@ryanlpoconnell
Copy link

ryanlpoconnell commented May 18, 2023

Description

Cannot scroll scrollview to reveal hidden content.

Simulator Screen Shot - iPhone SE (3rd generation) - 2023-05-18 at 14 03 11

Steps to Reproduce

Reproduce:

  1. Use the .Net Maui App template to create hello world project
    • Visual Studio Mac>New Project>Multiplatform>App> .NET MAUI> .Net Maui App
  2. Add an entry control somewhere on the MainPage.Xaml <Entry Placeholder="Test me" />
  3. Select a shorter iOS Simulator device (I used iPhone SE)
  4. Run the App, click entry to cause Keyboard to display thus hiding some content
  5. Observe that despite the content being in a scrollview, the hidden content cannot be scrolled to

Expected:

The scrollview is scrollable so as to access the content hidden by the keyboard.
Xamarin forms produces the expected result. You can scroll to reveal hidden content as expected without any special code to make this happen.

You can reproduce this expected behaviour by following the reproduction steps but instead of course using the XF template...

  • Visual Studio Mac>New Project>Multiplatform>App> Xamarin.Forms> Blank App

Actual:

Because the scrollview is not higher than the page, scrollview is not scrollable meaning once the keyboard is shown, no content hidden by the keyboard is accessible.

Problem:

Ignoring the fact this fix #4792 (which programatically scrolls to the entry which is focused) partly solves the problem, in my situation not being able to scroll is an issue because I have suggestion list which is displayed beneath the entry which also cannot be viewed or accessed which would I believe is not fixed by the aforementioned.

Another example is having a save button etc at the bottom of the page. Again not accessible then.

Link to public reproduction project repository

https://github.com/ryanlpoconnell/maui_ios_noscrollview_keyboard

Version with bug

7.0.81

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 16.2 (Possibly all)

Did you find any workaround?

HACKY due to time available... using previously used XF renderer
https://github.com/ryanlpoconnell/maui_ios_noscrollview_keyboard/tree/workaround_adjustlayoutmargin

NOTE: requires using UseMauiCompatibility() -> See https://learn.microsoft.com/en-us/dotnet/maui/migration/custom-renderers

Relevant log output

No response

@ryanlpoconnell ryanlpoconnell added the t/bug Something isn't working label May 18, 2023
@Eilon Eilon added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label May 18, 2023
@AnnYang01
Copy link

Verified this on Visual Studio Enterprise 17.7.0 Preview 3.0.
This issue does not repro on .NET8.0(Preview) but repro on .NET7.0 in iPhone SE iOS 16.4 with below Project:
MauiApp17.zip
Screenshot in .NET8.0(Preview)
image

@AnnYang01 AnnYang01 added s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version labels Jul 17, 2023
@ghost
Copy link

ghost commented Jul 17, 2023

Hi @ryanlpoconnell. 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 closed this as completed Jul 24, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 23, 2023
@Eilon Eilon added area-controls-scrollview ScrollView and removed area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter labels 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 platform/iOS 🍎 s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants