Bug 43230 - DisplayAlert returns unexpected value when Escape key hit on UWP
Summary: DisplayAlert returns unexpected value when Escape key hit on UWP
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-08-10 14:25 UTC by John Hardman
Modified: 2016-08-17 18:41 UTC (History)
3 users (show)

Tags: DisplayAlert UWP Escape Documentation ac
Is this bug a regression?: ---
Last known good build:

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 John Hardman 2016-08-10 14:25:09 UTC
The DisplayAlert function returns true on UWP if the user hits the Escape key when the alert is visible.

Using the DisplayAlert call with four arguments, 

    public System.Threading.Tasks.Task<bool> DisplayAlert (String title, String message, String accept, String cancel)

I would expect hitting Escape to be equivalent to selecting the cancel option, not the accept option. In that case, a return value of false would be expected if Escape is hit.

Also, related to fixing the return value, can the return value be documented on the following page please:
Comment 1 Samantha Houts [MSFT] 2016-08-17 18:41:14 UTC
Should be fixed in 2.3.3-pre1. Thank you!