Prism: [Bug] Navigation fails on MasterDetailPage (menu item tap) inside TabbedPage

Created on 13 Jan 2021  路  3Comments  路  Source: PrismLibrary/Prism

Description

Hi folks.

I am using a master details page inside a tabbed page. I have updated the Prism library and Xamarin. Forms packages, and now the navigation inside the master details page does not work correctly. When I tap on the menu item inside the master details page, the navigation does not happen. This behavior only happens when I put the master details page inside the Tabbed page (The root page is the Tabbed page). Everything works fine when I have a Master Details page as a Root page. So the questions are following. How can I tackle this problem? Is there any workaround using Prism navigation when we have a master details page inside a tabbed page?

I have attached a sample and gif files reproducing the navigation problems.
Thank you.

p.s. The same issue even when the "Xamarin.Forms" version is 4.8.0.1821

Steps to Reproduce

  1. Download the sample app
  2. Run the application
  3. Navigate to the master details page and try to tap any menu item.

Expected Behavior

Given: The application is running
And: I have navigated to the master details page (Master tab)
When: I tap on menu item (page 4)
Then: I should navigate to the corresponding page (page 4)

Actual Behavior

Given: The application is running
And: I have navigated to the master details page (Master tab)
When: I tap on menu item (page 4)
Then: The navigation does not happen and the current details page does not change

Basic Information

  • Version with issue: 8.0.0.1909
  • Last known good version: 7.2.0.1422
  • Xamarin.Forms version: 5.0.0.1874
  • IDE: Visual Studio 2019

Screenshots

Prism Navigation when using master details page inside tabbed page

RootIsTabbedPage

Prism Navigation when using master details as a root page

RootIsMasterDetail

Reproduction Link

reproduction link

sample -
PrismSample.zip

bug to verify

All 3 comments

First off, don't do that 馃槃

Never place a MDP in a TabbedPage. The MDP should always be a root page.

Also, TabbedPage navigation is completely broken right now. Due to the new scoping behavior we added, it is now assigning the wrong VM to the tab pages. Which means technically you are navigating from the wrong object. We are aware of this and investigating a fix.

Thank you @brianlagunas for your effort. Indeed the using MDP inside a tabbed page isn't a good approach, but I have to :-). Also, I would happy to see FlyOutPage support in the new release. It's very similar to MDP and I think it demands just a few lines of code inside PageNavigationService.

p.s. It would be nice to see also a stable version of the plugin.popup

We will eventually support FlyoutPage. Plugin.popup is not maintained by Prism.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kevinvella picture kevinvella  路  5Comments

tibitoth picture tibitoth  路  5Comments

joacar picture joacar  路  6Comments

brianlagunas picture brianlagunas  路  5Comments

tiagodenoronha picture tiagodenoronha  路  4Comments