Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Correct enter/esc keypress behaviors for MessageDialog #292

merged 1 commit into from Aug 16, 2016


Copy link

commented Aug 10, 2016

Description of Change

DisplayAlert was returning a true value when pressing the escape key while it was open on Windows (reported under UWP, but the behavior is a WinRT issue in general). It was also returning true when pressing the enter key. Inside of the OnPageAlert method where the DefaultCommandIndex value was being signed, that value was being set to zero as only one UICommand had been added by that point. Subsequently, the CancelCommandIndex was then being set to 0, which in this case would trigger the Accept command when pressing the escape key. Swapping the manner in which the values are set corrects the behavior.

Bugs Fixed

API Changes


Behavioral Changes


PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense

@jassmith jassmith merged commit 3ca06ea into master Aug 16, 2016

stefandevo added a commit to stefandevo/Xamarin.Forms that referenced this pull request Aug 31, 2016
Merge branch 'master' of
* 'master' of (69 commits)
  Fix docs
  [Win] Fix FontAttributes unexpectedly changing a label's size (xamarin#325)
  [A] Check UserVisibleHint to prevent non-active tabs from firing SendAppearing in OnResume (xamarin#328)
  KeyboardExtensions is now public (xamarin#326)
  [A] PanGestureRecognizer will consistently send Completed event (xamarin#313)
  Use character truncation in Windows (xamarin#321)
  Fix for ListView BindingContext for Header/Footer (xamarin#312)
  Fix memory leak caused by BaseCellView and RendererHolder (xamarin#311)
  Update Makefile to support linux env (xamarin#309)
  Platform Specifics (xamarin#301)
  Throw InvalidOperationException if AppLinkEntry.Thumbnail source is invalid (xamarin#299)
  Allow Custom Android MapRenderers to override the default MapView options (xamarin#285)
  Fix crash when ItemsSource is set to null (xamarin#320)
  Fixed SinInOut description. (xamarin#319)
  Fix regression by adding null check in Windows ListView selection (xamarin#314)
  [Android] Fix for NullReferenceException when using the wrong activit… (xamarin#286)
  [WinRT] Remove preemptive setting of null upon action sheet closure (xamarin#305)
  [Xaml] Clone node tree on DT, allow markup to be evaluated multiple times (xamarin#295)
  [Windows] Correct enter/esc keypress behaviors for MessageDialog (xamarin#292)
  [iOS] Change when we updated the XF INavigationPageController after popping a page natively, Cleanup UITest references (xamarin#291)

@rmarinho rmarinho deleted the fix-bugzilla43230 branch Jun 22, 2017

@samhouts samhouts added this to the 2.3.3 milestone Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.