Unable to select tab after backing out of page and returning #24741
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
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:
See the included project link for a sample project. It's in the TabbedPageSelection folder in the repository.
Reproduction steps with sample project:
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
The text was updated successfully, but these errors were encountered: