Bug 6266 - UIAlertView disables other button when click/dismiss event is registered
Summary: UIAlertView disables other button when click/dismiss event is registered
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 5.3.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-07-25 02:59 UTC by Henning
Modified: 2012-07-27 08:57 UTC (History)
2 users (show)

Tags:
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:
Status:
RESOLVED FIXED

Description Henning 2012-07-25 02:59:43 UTC
Hi!

Occures in Version Monotouch: 5.3.5

If you assign a click or dismiss event then the UIAlertViews other button is no longer clickable (disabled).

alertView = new UIAlertView ("Error occured", "test", null, "Ok", new string[] { "Report error" });
alertView.Clicked += HandleAlertViewClicked;

void HandleAlertViewClicked (object sender, UIButtonEventArgs e)
{		
}

Reproduce by commenting the clicked handler in and out.

If this is intentionally please tell me, how to enable the Report error button.

Thank you very much and keep up the good work, MT is an awesome product!
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-07-25 20:09:28 UTC
You can enable the button like this:

alertView.ShouldEnableFirstOtherButton = (a) => true;

In any case the current behavior is quite counter-intuitive (adding an event handler shouldn't automagically disable a button), so I've fixed it for the next version (5.3.6).

master: 80ca4af811fa35aea09c8cb93655d95d0260d004.
Comment 2 Henning 2012-07-27 08:57:34 UTC
Thank you!