diff --git a/src/Uno.Extensions.Navigation.UI/Navigator.cs b/src/Uno.Extensions.Navigation.UI/Navigator.cs index 00e6af4387..5aa42f94c2 100644 --- a/src/Uno.Extensions.Navigation.UI/Navigator.cs +++ b/src/Uno.Extensions.Navigation.UI/Navigator.cs @@ -154,13 +154,21 @@ await RedirectForDependsOn(request, rm) is { } dependsNavResponse) // where request needs to be sent to parent so that all child // regions receive the request) // Required for Test: Given_NavigationView.When_NavigationView - if (await CanNavigate(request.Route) && - !await ParentCanNavigate(request.Route)) + var canNavigate = await CanNavigate(request.Route); + //var parentCanNavigate = request.Route.Base == "ChefsRecipeDetails" ? false : await ParentCanNavigate(request.Route); + var parentCanNavigate = await ParentCanNavigate(request.Route); + if (canNavigate && + !parentCanNavigate) { if (Logger.IsEnabled(LogLevel.Trace)) Logger.LogTraceMessage($"No redirection - Navigator can handle request (and parent cannot)"); return default; } + //if (canNavigate) + //{ + // if (Logger.IsEnabled(LogLevel.Trace)) Logger.LogTraceMessage($"Navigator can handle request - navigating"); + // return default; + //} // If this is a back/close with no other path, then return // as if this navigator can handl it - it can't, so the request diff --git a/testing/TestHarness/TestHarness/Ext/Navigation/Apps/Chefs/ChefsFavoriteRecipesModel.cs b/testing/TestHarness/TestHarness/Ext/Navigation/Apps/Chefs/ChefsFavoriteRecipesModel.cs index 5a50c50c78..68dc9e10ff 100644 --- a/testing/TestHarness/TestHarness/Ext/Navigation/Apps/Chefs/ChefsFavoriteRecipesModel.cs +++ b/testing/TestHarness/TestHarness/Ext/Navigation/Apps/Chefs/ChefsFavoriteRecipesModel.cs @@ -6,6 +6,6 @@ public partial class ChefsFavoriteRecipesModel(INavigator navigator) { public async ValueTask NavigateToRecipeDetail() { - await navigator.NavigateRouteAsync(this, "ChefsFavoriteRecipeDetails", data: new ChefsRecipe { Name = "Favorite Page" }); + await navigator.NavigateRouteAsync(this, "/ChefsRoot/ChefsFavoriteRecipes/ChefsRecipeDetails", data: new ChefsRecipe { Name = "Favorite Page" }); } } diff --git a/testing/TestHarness/TestHarness/Ext/Navigation/Apps/Chefs/ChefsFavoriteRecipesPage.xaml b/testing/TestHarness/TestHarness/Ext/Navigation/Apps/Chefs/ChefsFavoriteRecipesPage.xaml index a5bae446ec..5650f8598b 100644 --- a/testing/TestHarness/TestHarness/Ext/Navigation/Apps/Chefs/ChefsFavoriteRecipesPage.xaml +++ b/testing/TestHarness/TestHarness/Ext/Navigation/Apps/Chefs/ChefsFavoriteRecipesPage.xaml @@ -35,7 +35,7 @@ VerticalAlignment="Center" Text="All my recipes" />