-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
In any project, just add these three lines anywhere. After execution, the screen will be blank, even though it’s expected to remain on the same page we started from.
await Navigation.PushModalAsync(new ContentPage() { Content = new Label() { Text = "Hello!" } }, false);
await Task.Yield();
await Navigation.PopModalAsync();
In fact, this is a very serious bug, since any “unlucky” modal (popup) display completely freezes the entire application, blocking all input.
Also reproduces with Navigation.PopToRootAsync() instead of Navigation.PopModalAsync().
Found on Android API33-36, haven't tested on iOS
Here's what it looks like in the default project template:
private void OnCounterClicked(object? sender, EventArgs e)
{
Dispatcher.DispatchAsync(async () =>
{
await Navigation.PushModalAsync(new ContentPage() { Content = new Label() { Text = "Hello!" } }, false);
await Task.Yield();
await Navigation.PopModalAsync();
});
}
Current behavior (The app is blocked. Neither the previous page nor even the content of the modal is visible):
Screen_Recording_20251031_083406.mp4
Expected behavior (The modal appears and disappears quickly. There is a wait for two Task.Yield() here)
Screen_Recording_20251031_083439.mp4
Steps to Reproduce
- Add and call these three lines anywhere (for example, in the "Click me" button handler in the newly created MAUI project template in Visual Studio)
- The application is blocked with empty screen without any way to exit this state.
Link to public reproduction project repository
No response
Version with bug
9.0.110 SR12
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
No response
Affected platforms
Android
Affected platform versions
Reproduced at least on Android 33, 36
Did you find any workaround?
No