From 75b9525607c341f52e51ff855dbc5799f47b0499 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 7 Dec 2010 02:15:37 -0800 Subject: [PATCH 1/1] Fix 'resubmit form' dialog: new alert API crash. --- UICaboodle/BrowserView.mm | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm index 168cff1b..1017496e 100644 --- a/UICaboodle/BrowserView.mm +++ b/UICaboodle/BrowserView.mm @@ -837,19 +837,13 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se [alert dismissWithClickedButtonIndex:-1 animated:YES]; } else if ([context isEqualToString:@"submit"]) { - switch (button) { - case 1: - break; - - case 2: - if (request_ != nil) { - WebThreadLock(); - [webview_ loadRequest:request_]; - WebThreadUnlock(); - } - break; - - _nodefault + if (button == [alert cancelButtonIndex]) { + } else if (button == [alert firstOtherButtonIndex]) { + if (request_ != nil) { + WebThreadLock(); + [webview_ loadRequest:request_]; + WebThreadUnlock(); + } } [alert dismissWithClickedButtonIndex:-1 animated:YES]; -- 2.45.2