Xamarin.Forms icon indicating copy to clipboard operation
Xamarin.Forms copied to clipboard

[iOS] XF - Navigation.PushAsync doesn't work from any page opened in "More" TabbedPage.

Open leszekkadlof opened this issue 7 years ago • 5 comments

Description

In Xamarin.Forms you cannot push any new child pages if the Page (wrapped in a NavigationPage) is located in the 'More' section of the TabbedPage. If you try to push a new child page, then nothing appears to happen however if you Back out of the parent page and return into the 'More' page (containing list of excessive tabs) and go back to the previously mentioned parent page then the page is blank indicating some sort of Navigation stack corruption. This appears to only fail on iOS.

The demo app attached is a simple app that has 6 tabs where each page has a button that pushes a new page onto the stack.

Steps to Reproduce

  1. Start the Demo
  2. Click into 'More' and choose page '5',
  3. Then click 'Open Page 5' (and nothing happens)
  4. Back out onto the 'More' page via '< More' and go back into page '5'
  5. Now the page is blank.

Expected Behavior

The new page called 'Inner Page 5' to appear and be pushed onto the navigation stack with a 'Back' button.

Actual Behavior

The Navigation.PushAsync does not push the new page onto display while current page appears to get corrupted if you navigate out via the '< More' button and back into that page.

Basic Information

  • Version with issue: 3.0.0.446417 and above
  • Last known good version: n/a
  • IDE: VS for Mac 7.5.4 (build 3)
  • Platform Target Frameworks:
    • iOS: iPhone X iOS 11.4
    • Android: API 25
    • UWP: n/a
  • Android Support Library Version: n/a
  • Nuget Packages: Xamarin.Forms (3.1.0.697729)
  • Affected Devices: iOS Simulator

Screenshots

navigationfailureinmore

Reproduction Link

PushBugInMoreTabbedPage.zip

leszekkadlof avatar Aug 04 '18 09:08 leszekkadlof

-EDIT- I built a basic POC with the most basic tabbed page that had navigation page children and was not able to replicate the seemingly-related problem I mentioned earlier. I've deleted it to avoid muddying the waters.

LJordanCoCo avatar Sep 14 '18 13:09 LJordanCoCo

After banging my head forever trying to figure out why this works for Android and not iOS even though there are no errors whatsoever.... I found this issue 🤦🏻‍♀️

This is still an issue for my current version on Xamarin.Forms on Visual Studio Mac. When a NavigationPage is in "More" and tries to PushAsync() to go to another page, the constructor of the new page runs, but its OnAppearing() doesn't and neither does the OnDisappearing() of the previous page.

Xamarin.Mac Version: 6.22.1.26 (Visual Studio Community)

Xamarin.iOS Version: 14.4.1.3 (Visual Studio Community)

Only workaround I know is to re-order tabs so that ones without ToolbarItems (using PushAsync) are listed earlier so they don't get pushed to "More" section in iOS.

LittleCornerDev avatar Nov 12 '20 00:11 LittleCornerDev

Any updates for this?

2dc-gidz avatar Jun 27 '21 15:06 2dc-gidz

Still an issue in iOS 15.1 and Xamarin 5.0.0+

edgiardina avatar Dec 07 '21 18:12 edgiardina

Any update for this?

ArunaYarra avatar Apr 11 '24 11:04 ArunaYarra