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] Using safe area causes white area at the top upon entry focus. #25866

Open
mkshiblu opened this issue Nov 14, 2024 · 2 comments · May be fixed by #26063
Open

[iOS] Using safe area causes white area at the top upon entry focus. #25866

mkshiblu opened this issue Nov 14, 2024 · 2 comments · May be fixed by #26063
Assignees
Labels
area-controls-entry Entry platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@mkshiblu
Copy link

Description

Problem: A white area appears at the top when an entry is tapped on and the soft keyboard opens up on iOS. Upon closing the keyboard, the area disappears. The area sometimes becomes bigger and permanent upon returning from a detail page.

Image

Sample Code:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="MauiApp2.MainPage"
            xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
             ios:Page.UseSafeArea="False"
             Shell.NavBarIsVisible="False">

    <Grid BackgroundColor="Yellow"
          IgnoreSafeArea="True">
        <Entry Text="Entry"
               BackgroundColor="White"
               VerticalOptions="Start"
               Margin="50" />
    </Grid>

</ContentPage>

Shell or Navigation page didn't make any difference

Steps to Reproduce

STEPS:

  1. Create a new MAUI project .net 8.0.x
  2. Set the content page's ios:Page.UseSafeArea="False" via XAML
  3. Set the page's Shell.NavBarIsVisible="False" since we don't want to show the navbar
  4. In the top-level child grid, set the IgnoreSafeArea to True so that it can be rendered on top of the iOS dynamic island or other controls
  5. Add an Entry to the top-level child grid close to the dynamic island. The issue is not reproduced if the entry is not close to the physical phone non-safe areas.
  6. Tap on the entry to enter something, the keyboard should open.

Observed Behavior: When the Keyboard opens, it seems like the entire layout drops down a bit as well. A white border appears at the very top of the display. Upon closing the keyboard, the area disappears.

Expected Behavior: The page top area should remain the same upon keyboard opening.

In addition to that, when coming back from another page the top white area becomes bigger and remains that way.

Link to public reproduction project repository

No response

Version with bug

8.0.93 SR9.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

iOS

Affected platform versions

iOS 17.5, iOS 18 both sim and physical device

Did you find any workaround?

None since it seemed like a core MAUI issue.

Relevant log output

@mkshiblu mkshiblu added the t/bug Something isn't working label Nov 14, 2024
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@Zhanglirong-Winnie Zhanglirong-Winnie added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Nov 15, 2024
@Zhanglirong-Winnie
Copy link

This issue has been verified using Visual Studio 17.13 Preview 1( 9.0.10 & 8.0.93 & 8.0.83). Can repro this issue on iOS platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-entry Entry platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
5 participants