Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation - Shell TabBar Doesnt render Content when navigating from and then back to it #26144

Open
corne-ac opened this issue Nov 27, 2024 · 2 comments
Labels
platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@corne-ac
Copy link

corne-ac commented Nov 27, 2024

Video-Bug.mp4

Description

So basically, scenario, we have a Mainpage, and from this Mainpage the user navigates to a tabbed page, this login and tabbed page is registered in the AppShell.Xaml.
the tabbed page, is another shell containing a TabBar with multiple pages.
When the user navigates from the main page, to the tabbed page, back to main page, and Again to the Tabbed page, the page content doesnt render anymore.
Its a niche scenario but it is currently causing issues in our application.
I have created a sample project that I was able to successfully recreate the issue in.

Steps to Reproduce

  1. Create an empty project
  2. on the AppShell.Xaml, register this:
<ShellContent
        Title="Main Page"
        ContentTemplate="{DataTemplate local:MainPage}"
        Route="MainPage" />

    <TabBar>
        <Tab Route="DashboardPage">
            <ShellContent
                Title="Dashboard"
                ContentTemplate="{DataTemplate local:DashboardPage}"/>
        </Tab>

    </TabBar>
  1. On the dashboardPage, xaml:
<Shell xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:navBugTest="clr-namespace:NavBugTest"
             x:Class="NavBugTest.DashboardPage">
    <TabBar>
        <Tab
            x:Name="HomeTab"
            Title="Home"
            Icon="home">
            <ShellContent ContentTemplate="{DataTemplate navBugTest:HomePage}" Route="HomePage" />
        </Tab>
        <Tab
            x:Name="SecondTab"
            Title="Home"
            Icon="home">
            <ShellContent ContentTemplate="{DataTemplate navBugTest:HomePage}" Route="HomePage" />
        </Tab>
    </TabBar>
</Shell>


  1. And on the HomePage Xaml, just some content, same with the MainPage.
  2. Add buttons on the mainpage and homepage to navigate between the dashboardpage and the mainpage

Link to public reproduction project repository

https://github.com/corne-ac/Maui-Navigation-Bug

Version with bug

8.0.100 SR10

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 35

Did you find any workaround?

No

Relevant log output

@corne-ac corne-ac added the t/bug Something isn't working label Nov 27, 2024
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@kevinxufei kevinxufei added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed platform/android 🤖 labels Nov 27, 2024
@kevinxufei
Copy link

I can repro this issue at Android platform on the latest 17.13 Preview 1(8.0.93 & 8.0.100).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants