maui icon indicating copy to clipboard operation
maui copied to clipboard

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

Open BagavathiPerumal opened this issue 1 year ago • 17 comments

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, mapping the IsSelected property of the CurrentPage, and setting IsSelected in the MapItemSource to resolve the background-related issue.

Tested the behavior in the following platforms.

  • [x] Windows
  • [x] Android
  • [x] iOS
  • [x] Mac

Issues Fixed

Fixes https://github.com/dotnet/maui/issues/24741

Output

Before Issue Fix After Issue Fix

BagavathiPerumal avatar Sep 30 '24 15:09 BagavathiPerumal

/azp run

jsuarezruiz avatar Oct 04 '24 07:10 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 04 '24 07:10 azure-pipelines[bot]

/azp run

PureWeen avatar Oct 04 '24 21:10 PureWeen

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 04 '24 21:10 azure-pipelines[bot]

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.

BagavathiPerumal avatar Oct 16 '24 13:10 BagavathiPerumal

/azp run

jsuarezruiz avatar Oct 18 '24 06:10 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 18 '24 06:10 azure-pipelines[bot]

Added UITest. uitest-25011

jsuarezruiz avatar Oct 18 '24 08:10 jsuarezruiz

/azp-run

jsuarezruiz avatar Oct 18 '24 08:10 jsuarezruiz

Added UITest. uitest-25011

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

BagavathiPerumal avatar Oct 18 '24 12:10 BagavathiPerumal

/azp run

PureWeen avatar Oct 21 '24 15:10 PureWeen

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 21 '24 15:10 azure-pipelines[bot]

/azp run

jsuarezruiz avatar Oct 22 '24 13:10 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 22 '24 13:10 azure-pipelines[bot]

/azp run

jsuarezruiz avatar Oct 22 '24 13:10 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 22 '24 13:10 azure-pipelines[bot]

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 29 '24 13:10 azure-pipelines[bot]

/azp run

jsuarezruiz avatar Nov 04 '24 10:11 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Nov 04 '24 10:11 azure-pipelines[bot]

/azp run

jsuarezruiz avatar Nov 06 '24 10:11 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Nov 06 '24 10:11 azure-pipelines[bot]

/rebase

jsuarezruiz avatar Nov 08 '24 11:11 jsuarezruiz

/azp run

jsuarezruiz avatar Nov 08 '24 12:11 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Nov 08 '24 12:11 azure-pipelines[bot]

/rebase

sheiksyedm avatar Nov 19 '24 06:11 sheiksyedm

/azp run

jsuarezruiz avatar Nov 20 '24 14:11 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Nov 20 '24 14:11 azure-pipelines[bot]

/rebase

BagavathiPerumal avatar Dec 03 '24 09:12 BagavathiPerumal

/rebase

BagavathiPerumal avatar Dec 13 '24 07:12 BagavathiPerumal

/azp run

PureWeen avatar Jan 06 '25 08:01 PureWeen