This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 43230 - DisplayAlert returns unexpected value when Escape key hit on UWP
Summary: DisplayAlert returns unexpected value when Escape key hit on UWP
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 2.3.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-08-10 14:25 UTC by John Hardman
Modified: 2016-08-17 18:41 UTC (History)
3 users (show)

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


Attachments

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:
https://developer.xamarin.com/api/member/Xamarin.Forms.Page.DisplayAlert/p/System.String/System.String/System.String/System.String/
Comment 1 Samantha Houts 2016-08-17 18:41:14 UTC
Should be fixed in 2.3.3-pre1. Thank you!

Note You need to log in before you can comment on or make changes to this bug.