dotnet / dotnet/maui

SafeAreaEdges: Resize delay when virtual keyboard is shown

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

Description

### Description

The keyboard safe area is applied with a slight delay on Android. This looks odd and also leads layout problems when used with a BlazorWebView (see Sample App)
Regression from .net 9

### Steps to Reproduce

- Clone https://github.com/markusroessler/MauiSafeAreaEdgesDelay
- Start the app and focus the textarea

-> The viewport of the WebView gets pushed up for a moment and then jumps back down once the new `MauiWindowInsetListener` kicks in.

- now enable the following line in MainPage.Android.cs
`ViewCompat.SetOnApplyWindowInsetsListener(platformView, new CustomOnApplyWindowInsetsListener()); `
- Start the app and focus the textarea

-> The page is immediately resized and the textarea remains visible as with .net 9

### Link to public reproduction project repository

https://github.com/markusroessler/MauiSafeAreaEdgesDelay

### Version with bug

10.0.30

### Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

### Last version that worked well

9.0.120 SR12

### Affected platforms

Android

### Affected platform versions

Android 16

### Did you find any workaround?

replace MauiWindowInsetListener - see "Steps to Reproduce"

### Relevant log output

```shell

```

Contributor guide

Open the contributing guide

Research direction

Start with the Android safe-area handling around MauiWindowInsetListener and compare it with the listener setup shown in MainPage.Android.cs of the linked reproduction project. Run the sample app, focus the textarea, and verify that the WebView resizes immediately without first being pushed up and then jumping back down.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.