Skip to content

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

Merged
PureWeen merged 11 commits into
dotnet:mainfrom
BagavathiPerumal:fix-24741
Jan 15, 2025
Merged

Fix for unable to select a tab after backing out of a page and returning.#25011
PureWeen merged 11 commits into
dotnet:mainfrom
BagavathiPerumal:fix-24741

Conversation

@BagavathiPerumal

@BagavathiPerumal BagavathiPerumal commented Sep 30, 2024

Copy link
Copy Markdown
Contributor

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

@dotnet-policy-service dotnet-policy-service Bot added the community ✨ Community Contribution label Sep 30, 2024
@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
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

PureWeen commented Oct 4, 2024

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz

Copy link
Copy Markdown
Contributor

Added UITest.
uitest-25011

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp-run

@BagavathiPerumal

BagavathiPerumal commented Oct 18, 2024

Copy link
Copy Markdown
Contributor Author

Added UITest.
uitest-25011

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

@PureWeen

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz

jsuarezruiz commented Oct 22, 2024

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis jfversluis requested a review from PureWeen October 29, 2024 13:22
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

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

Copy link
Copy Markdown
Contributor

/azp run

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/rebase

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@sheiksyedm

Copy link
Copy Markdown
Contributor

/rebase

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@BagavathiPerumal

Copy link
Copy Markdown
Contributor Author

/rebase

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

Copy link
Copy Markdown
Contributor Author

/rebase

@PureWeen

PureWeen commented Jan 6, 2025

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen left a comment

Copy link
Copy Markdown
Member

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
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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