Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] [iOS] Navigating to a ModalPage under another tab than selected won't change selected tab #15608

Open
MaxFmi opened this issue Nov 17, 2022 · 0 comments
Labels
a/navigation p/iOS 🍎 s/unverified New report that has yet to be verified t/bug 🐛

Comments

@MaxFmi
Copy link

MaxFmi commented Nov 17, 2022

Description

Navigating to a ModalPage under another tab than selected, leaves us on the page where we were before invoking Shell.Current.GoToAsync (see attached video and steps to reproduce for more details).

NavigateToModalPageOnAnotherTab.mov

Steps to Reproduce

NavigationIssue.zip

  1. Download attached project NavigationIssue.zip or clone it from GitHub https://github.com/MaxFmi/NavigatingToASubPageUnderAnotherTabThanSelected
  2. Unzip and open it in your IDE
  3. Start Application on iOS
  4. Select the third tab
  5. Click on the Button "GoTo RegularPage"
  6. Select second tab
  7. Click on the Button "GoTo ModalPage under TabItem 3"

Expected Behavior

  • The target ModalPage shows up but gets removed right away.
  • When we afterwards select the third tab, we see the ModalPage that we wanted navigate to.

Actual Behavior

Third tab should be the selected one and we should see and stay on the ModalPage.

Basic Information

  • Version with issue: 5.0.0.2478
  • Last known good version: -
  • Platform Target Frameworks:
    • iOS: 15.5
  • Affected Devices: iOS

Reproduction Link

Workaround

Having a separate GoToAsync call that pre-selects the target tab
// A separate navigation call to select the target tab.
// await Shell.Current.GoToAsync("//TabBar/Tab.Item3/");

// When we only have this invocation, the target tab will not be selected.
await Shell.Current.GoToAsync("//TabBar/Tab.Item3/ModalPage", false);

When we don't use the false parameter for the animation in the second call we will see how the NavigationStack is cleared for the target Tab (see video below).
https://user-images.githubusercontent.com/61872738/202434681-c4039139-2b5b-494e-8e8b-d4477d53bc42.mov

@MaxFmi MaxFmi added s/unverified New report that has yet to be verified t/bug 🐛 labels Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/navigation p/iOS 🍎 s/unverified New report that has yet to be verified t/bug 🐛
Projects
None yet
Development

No branches or pull requests

3 participants
@jsuarezruiz @MaxFmi and others