dotnet / dotnet/maui

[iOS] Vertical `SafeAreEdge` isn't respected when `Top` and `Bottom` constraints mismatch

Open
#34,563 4 comments 0 reactions 0 assignees View on GitHub
area-safearea i/regression partner/syncfusion platform/ios regressed-in-10.0.50 s/triaged s/verified t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 14h
Merged PRs (30d)
296

Description

### Description

I want my page to be displayed behind the status bar (top safe area), but not behind the bottom safe area.
To do so, I set `SafeAreaEdges="None,None,None,Container"` at the page level.

I also want some sub elements to avoid the safe areas.
To do so, I set `SafeAreaEdges="Container"` at the element level.

This works pretty well on Android for all cases.

https://github.com/user-attachments/assets/dbc7c2d4-f473-45be-817f-77c474b06a31

This works well on iOS when the top and bottom container `SafeAreaRegion` matches, but not when they differ.
The sub elements might be displayed in the safe area

https://github.com/user-attachments/assets/0cbf4a1e-fe44-4a4b-88b3-306a5e0395a0

I've tested the following versions:

| Version | Status |
|--------|--------|
| `10.0.1` | ✅ |
| `10.0.50` | ❌ |
| `10.0.60-ci.main.26168.7` | ❌ |

### Steps to Reproduce

1. Clone the reproduction project repo
2. Run the app

### Link to public reproduction project repository

https://github.com/EmilienDup/MAUISafeAreaEdgesMismatchingVerticalConstraintiOSBug

### Version with bug

10.0.50

### Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

### Last version that worked well

10.0.1

### Affected platforms

iOS

### Affected platform versions

_No response_

### Did you find any workaround?

_No response_

### Relevant log output

```shell

```

Contributor guide

Open the contributing guide

Research direction

Start with the linked reproduction project and run it on iOS using .NET MAUI 10.0.50, then compare it with 10.0.1. Trace the iOS handling of the page and element SafeAreaEdges values when the top and bottom constraints differ. Done means the reproduction keeps sub-elements out of the intended safe areas in the mismatched-constraint case, with regression coverage for that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, ios
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.