dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.16k stars 1.74k forks source link

GotoAsync not working after executing PushModalAsync in .Net MAUI #7522

Open DharunAR opened 2 years ago

DharunAR commented 2 years ago

Description

We are in the progress on migrating our existing xamarin project to .Net MAUI.

We found the Shell.Current.GoToAsync is not working after executing the PushModalAsync and when the MainPage is not set as AppShell from the App.cs class. I have created a simple sample to replicate this problem added steps below, please verify.

We are using Visual Studio Preview version 17.3 and MAUI package version 6.0.312.

Steps to Reproduce

  1. Download the sample from https://github.com/DharunAR/TestMauiApp.
  2. Run the app from Android simulator(12)
  3. From the App class, we are executing a testpage that has a simple button.
  4. On button click, we are calling App.Current.MainPage.PushModalAsync(new PushModal()) to display an another page, this PushModal page contains a button control
  5. On clicking on PushModal page button, we are setting mainpage as AppShell and doing some operations and navigating to different page using Shell.Current.GoToAsync(nameof(somepage));
  6. GoToAsync is not working, we observed this call is not working when we are trying to execute the page using PushModalAsync. This has been working with our xamarin projects, due to this issue we are in holding our work on our current migration to .Net MAUI. A possible fix will help.

Version with bug

6.0 Release Candidate 3

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 12.0

Did you find any workaround?

Calling popmodalasync before calling gotoAsync is working, but i dont think that as a valid workaround, as the popmodalasync will clears all the navigation pages.

Relevant log output

No response

VincentBu commented 2 years ago

repro with vs main (32526.500.main). clicking Testing button doesn't navigate to DetailPage

DharunAR commented 2 years ago

Can you please provide me with some updates on this case? When I can expect the fix?

ghost commented 1 year ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

XamlTest commented 1 year ago

Verified this on Visual Studio Enterprise 17.6.0 Preview 7.0. Repro on Android 13.0 with below Project: 7522.zip Button

abani1986 commented 1 year ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

Can we get some update on this? This is blocking our Xaamrin project migration to .Net Maui