maui icon indicating copy to clipboard operation
maui copied to clipboard

Tabs on TabbedPage gone after popping Modal in background

Open VoldersS opened this issue 1 year ago • 3 comments

Description

Seen on Android:

When popping a Modal that's displayed over a TabbedPage and sending the app to the background, when resuming the app the tabs are gone.

I've simulated some task before popping the modal. If you send the app to the background during this 2.5s, and resume it when the Modal is actually popped, the tabs on the TabbedPage are no longer displayed.

Summary: navigating in the background results in invisible tabs on TabbedPage

Steps to Reproduce

  1. Create a MAUI project with a TabbedPage as MainPage and 2 Tabs

  2. Push a third Page from one of the tab pages await Navigation.PushModalAsync(new ModalPage());

  3. Pop the modal on button click in the modal

await Task.Delay(2500);
await Navigation.PopModalAsync();

When backgrounding the app during that 2500 ms Task, and resuming it after, the tabs on the TabbedPage are no longer visible.

Actual result: Tabs are gone

https://github.com/dotnet/maui/assets/169977030/aa91bfcb-edb4-42cf-91c7-228e7c2ff43a

Expected result: Tabs are still visible This is the current behaviour when using a Shell TabBar instead of the TabbedPage

https://github.com/dotnet/maui/assets/169977030/1fe971ec-c309-4c19-82eb-35476c5669d8

Link to public reproduction project repository

https://github.com/VoldersS/TabbedPageBug

Version with bug

8.0.40 SR5

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 14

Did you find any workaround?

Works correctly using Shell, but since it's not supported while also using NavigationPages it's not really a workaround if you need NavigationPages.

Relevant log output

No response

VoldersS avatar May 16 '24 09:05 VoldersS

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

github-actions[bot] avatar May 16 '24 09:05 github-actions[bot]

Verified this issue with Visual Studio 17.10 Preview 7(8.0.3&8.0.14&8.0.20&8.0.40). Can repro on Android platform with sample project.

Zhanglirong-Winnie avatar May 16 '24 09:05 Zhanglirong-Winnie

Repro'd on my environment, getting this with an enterprise app I'm converting over to MAUI from XF.

Environment:

Microsoft Visual Studio Enterprise 2022 (64-bit) - Current Version 17.10.4

Project Refs:

.NET Version: net8.0
Microsoft.Maui: 8.0.72
CommunityToolkit.Maui: 9.0.2

CmdrFigrow avatar Oct 24 '24 11:10 CmdrFigrow

Stumbling upon this as well. Also it's strange that the tabs disappear while a modal is shown. Definitely wasn't the case in XF.

FlavioGoncalves-Cayas avatar Mar 14 '25 12:03 FlavioGoncalves-Cayas