I am using shell navigation with a tab bar and four tabs. Each tab contains a content page. Some of these content pages navigate to other (e.g detail) pages and some of these go down a further level. Navigation works fine with the back button retracing its way back up the stack. On one page I have added a fourth level and it works fine. On another tab, I have added a fourth level but its back button consistently does nothing.
I modified the navigation service method to the following to aid debugging.
private Task NavigateTo(string route)
{
var shell = Shell.Current;
var count = shell.Navigation.NavigationStack.Count;
foreach (Page page in shell.Navigation.NavigationStack)
{
if (page is not null)
{
Console.WriteLine(page.Title);
}
}
Console.WriteLine($"Navigating to page: {route}");
return Shell.Current.GoToAsync(route);
}
When using the back button on the fourth level the route is "..", the count is 3, and the two previous pages are listed in the console output - so a navigation stack exists.
Why does the ".." request do nothing with no error/exception being raised?