Skip to content

[iOS] Using long-press navigation on back button using shell does not update the shell's current page #23892

@Vetle444

Description

@Vetle444

Description

First of all, thank you for the amazing framework you have built!

We are struggling with using the long-press navigation on the back button, here is what happens:
If one is using Shell and the NavigationStack is >1, you get a back button where you can long-press on it to show all the pages that is in the NavigationStack (except for the page you are at of course). If you select a page to navigate back to, the Shell's CurrentPage is not getting updated. This is causing problems in our published app.

image

Steps to Reproduce

  1. Use the standard .NET MAUI sample.
  2. Create a new ContentPage (TestPage.cs).
  3. Create a button to navigate to it: _ = Shell.Current.Navigation.PushAsync(new TestPage());.
  4. Tap and hold on the back button and release to navigate back.
  5. Set a breakpoint in the page you navigated back to, for instance in OnAppearing.
  6. Observe that the Shell.Current.CurrentPage property is still set to the page you navigated to before.

Link to public reproduction project repository

No response

Version with bug

8.0.70 SR7

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

All iOS versions

Did you find any workaround?

No. I don't think there is any workaround to be found for this. One could possibly be able to disable the feature though.

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions