Bug 60918 - Mouse back button doesn't work unless hovering page element
Summary: Mouse back button doesn't work unless hovering page element
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.5.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-11-30 02:04 UTC by Adam Patridge [MSFT]
Modified: 2017-12-01 00:51 UTC (History)
2 users (show)

Tags: back, navigation, mouse, ac
Is this bug a regression?: ---
Last known good build:

Repro solution set up to add to a navigation stack for testing. (1.07 MB, application/x-zip-compressed)
2017-11-30 02:04 UTC, Adam Patridge [MSFT]

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 for Bug 60918 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Adam Patridge [MSFT] 2017-11-30 02:04:16 UTC
Created attachment 25868 [details]
Repro solution set up to add to a navigation stack for testing.

The mouse back button in UWP seems to navigate back in a navigation stack, but in Xamarin.Forms it seems this only works if you are mousing over a control.

## Steps

0. Get a mouse with a back button
1. File > New Forms solution
2. In App.xaml.cs, make the app run in a NavigationPage
3. In Main.xaml/.cs make a way to add more to the page stack (e.g., button that pushes another MainPage; see attached project)
4. Run app on local UWP machine
5. Navigate deeper a few pages
6. Mouse into some whitespace in the app (e.g., between the "Welcome to Xamarin.Forms" label and the button added in step 3

## Expected

UWP should navigate to the prior pages in the NavigationPage stack with each press of the mouse back button.

## Actual

The mouse back button will not do anything unless you mouse over a control (e.g., the "Welcome" label or the button from step 3).

## System Info (excerpt)

Microsoft Visual Studio Enterprise 2017 
Version 15.4.5
Microsoft .NET Framework
Version 4.7.02556

Installed Version: Enterprise


Visual Basic 2017   00369-60000-00001-AA352
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA352
Microsoft Visual C# 2017


Visual Studio Tools for Universal Windows Apps   15.0.27004.2010
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.


Xamarin (34c1b6c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK (HEAD/c2a33d8ea)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK (51128b8)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.