Bug 58707 - UWP Back Button Disapearing
Summary: UWP Back Button Disapearing
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-08-10 19:42 UTC by Alma Jensen
Modified: 2017-09-05 23:27 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Modified Version of Tabbed Page Demo (1.97 MB, application/x-zip-compressed)
2017-08-10 21:13 UTC, Alma Jensen

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Alma Jensen 2017-08-10 19:42:00 UTC
Back Arrow/ Hamburger button is disappearing on UWP in two different scenarios.  One performed when using the master detail page and Setting the IsPresented Property to false.  

The second way involves the use of a tabbed page.  One the first tab you navigate to a child page, then go to another tab, and then back to the first page at which point the back navigation arrow will be gone.
Comment 1 Paul DiPietro [MSFT] 2017-08-10 19:47:36 UTC
Hi, can you please upload/attach a reproduction project so we have the exact code you're using? Have you tested against the latest prerelease or nightly?
Comment 2 Alma Jensen 2017-08-10 20:14:33 UTC
I haven't had the time yet to write any demo projects.  I did send a copy of some code to David Ortinau that has the tabbed page issue as described.  You can reference the following forum post for more details on reproing the issue using a master detail page.


But I am encountering this bug using and the last few versions before this.
Comment 3 Alma Jensen 2017-08-10 21:13:08 UTC
Created attachment 24133 [details]
Modified Version of Tabbed Page Demo

This project has been updated to the latest pre-release of xamarin forms
Comment 4 Alma Jensen 2017-08-10 21:27:27 UTC
I've successfully reproed the problem using the Xamarin Tabbed Page Demo with some modifications.

On the Today Page Push the button to go to the test child page.  After this the back arrow should appear.

Now click on the tab for the Schedule page.  The Back arrow remains even though it shouldn't be there because there is no back page on this tab. Click the button there to open up the child page for the schedule page. (Side note in another project that I was experiencing this problem with iOS would not have the back arrow.)

Now go back to the Today tab and push the back button.  It does navigate back, and the back arrow disapears.  This again is as expected.

Now click on the schedule tab.  It should still be on the child page there as expected but the back arrow will be gone, even though it should be there.  (Side note, in my other project on iOS the back button in this situation is there.)

Additional notes, I have not tested this demo project on iOS.  I've only encountered this bug on UWP, I haven't tried at all on Android.  The master detail situation was only added here because it could be the same issue, I'm not sure.  I don't have a repro project yet for the situation with the Master Detail but again that was only on UWP.  As I recall though I didn't have that bug with the Master Detail on Xamarin Forms 2.2.x
Comment 5 Paul DiPietro [MSFT] 2017-08-10 22:30:19 UTC
When you get a moment, could you please test the repro you provided with the nightly build (https://blog.xamarin.com/try-the-latest-in-xamarin-forms-with-nightly-builds/)? It looks like it may fix the issue but I want to confirm it with you. I was able to return to the schedule page and still see the back button.

The settings tab seems to be acting up by showing the back button when one of the other tabs has navigated to a new page, but I want to make sure that at least the initial problem might be resolved.
Comment 6 Alma Jensen 2017-08-11 14:30:47 UTC
Yes the nightly build has fixed the issue I was seeing in the tabbed page situation.  I'm going to give this a test in my app that was seeing the Master Detail Page situation but yes this may very well be resolved.
Comment 7 Alma Jensen 2017-08-11 16:49:27 UTC
The Tabbed page issue is resolved.  The Master Detail issue with IsPresented = false is behaving differently I found the following bug reports that address that issue and some info on how to deal with it.   



Comment 8 John Hardman 2017-08-29 15:31:00 UTC
@Paul_DiPietro - Using 2.3.4, I am occasionally seeing pages appear without the back/up button on UWP. I have not identified any pattern so far. If I re-run the app, without re-building, I may see different behavior.

These are not Master/Detail or Tabbed pages, just navigable ContentPages. Is it possible that the change you mention above might resolve what I am seeing, or should I log another bug? I cannot create a repro-sample, as the problem is intermittent.
Comment 9 Alma Jensen 2017-08-29 16:11:04 UTC
@John Hardman try using the nightly builds and see if that resolves your issue.  the resolution for me isn't in any of the preview or release builds, well maybe the latest preview now since one came out not so long ago.  The bug fix for me was in the nightly build.
Comment 10 John Hardman 2017-09-05 23:27:04 UTC
@Alma_Jensen @Paul_DiPietro - Although it's not 100% repeatable, I think I've found the pattern in what I am seeing. In the OnStart of the PCL, if I mark OnStart async and in it await something (e.g. DisplayAlert), even if I use ConfigureAwait, the back button is liable to not appear on subsequent pages. It seems the longer I leave the await outstanding (i.e. not hitting a button on the DisplayAlert box), the more likely the problem is to show up. I'll log a separate bug for this, as this sounds unlikely to have the same cause as 58707.