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

Fix for unable to select a tab after backing out of a page and returning. #25011

Merged
merged 11 commits into from
Jan 15, 2025

Conversation

BagavathiPerumal
Copy link
Contributor

@BagavathiPerumal BagavathiPerumal commented Sep 30, 2024

Root cause

When navigating back to the main page, the SelectedItem restores its old value instead of clearing it. As a result, when updating with the MapCurrentPage, it does not get updated properly.

Description of Issue Fix

The fix involves setting the SelectedItem property of the NavigationView to null in the disconnect handler to resolve the tab selection issue and setting IsSelected in the MapItemSource to true when page matches view.CurrentPage, addressing the background-related issue.

Also, the issue with the TitleColor of the TabbedPage not updating correctly has been resolved by triggering the PropertyChanged event for TitleColor within the IsSelected property.

Tested the behavior in the following platforms.

  • Windows
  • Android
  • iOS
  • Mac

Issues Fixed

Fixes #24741

Output

Before Issue Fix After Issue Fix
24741-BeforeFix.mp4
24741-AfterFix.mp4

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@BagavathiPerumal BagavathiPerumal marked this pull request as ready for review October 4, 2024 12:58
@BagavathiPerumal BagavathiPerumal requested a review from a team as a code owner October 4, 2024 12:58
@PureWeen
Copy link
Member

PureWeen commented Oct 4, 2024

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add UI Test please

@BagavathiPerumal
Copy link
Contributor Author

Add UI Test please

@PureWeen, Unfortunately, I'm unable to include a test case for the fix, as it's not possible to add an automation ID for the tab title.

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

Added UITest.
uitest-25011

@jsuarezruiz
Copy link
Contributor

/azp-run

@BagavathiPerumal
Copy link
Contributor Author

BagavathiPerumal commented Oct 18, 2024

Added UITest.
uitest-25011

@jsuarezruiz, Thank you for your effort in adding and committing the test case for this complex scenario.

@PureWeen
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

jsuarezruiz commented Oct 22, 2024

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis jfversluis requested a review from PureWeen October 29, 2024 13:22
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen added this to the .NET 9 Servicing milestone Oct 31, 2024
@jsuarezruiz
Copy link
Contributor

/azp run

@jsuarezruiz jsuarezruiz self-requested a review November 8, 2024 11:56
@jsuarezruiz
Copy link
Contributor

/rebase

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@sheiksyedm
Copy link

/rebase

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@BagavathiPerumal
Copy link
Contributor Author

/rebase

@sheiksyedm sheiksyedm added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 6, 2024
@BagavathiPerumal
Copy link
Contributor Author

/rebase

@PureWeen
Copy link
Member

PureWeen commented Jan 6, 2025

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Failing tests are unrelated. These changes are only on windows

@PureWeen PureWeen merged commit d19ebef into dotnet:main Jan 15, 2025
107 of 110 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-navigation NavigationPage community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/windows 🪟
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Unable to select tab after backing out of page and returning
5 participants