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

Unable to select tab after backing out of page and returning #24741

Open
git103 opened this issue Sep 12, 2024 · 1 comment · May be fixed by #25011
Open

Unable to select tab after backing out of page and returning #24741

git103 opened this issue Sep 12, 2024 · 1 comment · May be fixed by #25011
Assignees
Labels
area-controls-tabbedpage TabbedPage migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/windows 🪟 t/bug Something isn't working
Milestone

Comments

@git103
Copy link

git103 commented Sep 12, 2024

Description

There seems to be an issue with selecting a tab that was previously selected after leaving the page and coming back.

Tab.selection.problem.mov

Steps to Reproduce

Initial setup for sample project:

  1. Create a new MAUI app. This is NOT a shell app.
  2. On the main page add a button that, when clicked, pushes a new tabbed page onto the navigation stack.
  3. On the tabbed page, include two (or more) pages as content.

See the included project link for a sample project. It's in the TabbedPageSelection folder in the repository.

Reproduction steps with sample project:

  1. Click the button on the main page to push the tabbed page into view. Two tabs should be displayed.
  2. Select the second tab.
  3. Press the back button to exit the tabbed page.
  4. Click the button the push a new tabbed page.
  5. Try selecting the second tab.

Expected Result:
The second tab is selected.

Actual Result:
The selection fails. Clicking on the second tab doesn't respond. Tabbed page remains displaying the first tab.

Link to public reproduction project repository

https://github.com/git103/MAUI_Issues

Version with bug

9.0.0-rc.1.24453.9

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

In the OnBackButtonPressed override on the tabbed page, set the CurrentPage = Children.First(). Essentially reseting selected tab back to the default first tab before leaving the tabbed page. Setting CurrentPage to null doesn't work, it seems to have to be the first tab.

Relevant log output

No response

@git103 git103 added the t/bug Something isn't working label Sep 12, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@samhouts samhouts added platform/windows 🪟 migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert labels Sep 12, 2024
@mattleibow mattleibow added this to the Backlog milestone Sep 12, 2024
@vishnumenon2684 vishnumenon2684 self-assigned this Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-tabbedpage TabbedPage migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants