File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed
Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -1269,28 +1269,6 @@ - (void)webView:(WKWebView *)webView runJavaScriptTextInputPanelWithPrompt:(NSSt
12691269 [alert addAction: cancelAction];
12701270 alert.preferredAction = okAction;
12711271 [[self topViewController ] presentViewController: alert animated: YES completion: NULL ];
1272- #else
1273- NSAlert *alert = [[NSAlert alloc ] init ];
1274- [alert setMessageText: prompt];
1275-
1276- const NSRect RCTSingleTextFieldFrame = NSMakeRect (0.0 , 0.0 , 275.0 , 22.0 );
1277- NSTextField *textField = [[NSTextField alloc ] initWithFrame: RCTSingleTextFieldFrame];
1278- textField.cell .scrollable = YES ;
1279- if (@available (macOS 10.11 , *)) {
1280- textField.maximumNumberOfLines = 1 ;
1281- }
1282- textField.stringValue = defaultText;
1283- [alert setAccessoryView: textField];
1284-
1285- [alert addButtonWithTitle: NSLocalizedString(@" OK" , @" OK button" )];
1286- [alert addButtonWithTitle: NSLocalizedString(@" Cancel" , @" Cancel button" )];
1287- [alert beginSheetModalForWindow: [NSApp keyWindow ] completionHandler: ^(NSModalResponse response) {
1288- if (response == NSAlertFirstButtonReturn ) {
1289- completionHandler ([textField stringValue ]);
1290- } else {
1291- completionHandler (nil );
1292- }
1293- }];
12941272#endif // !TARGET_OS_OSX
12951273 } else {
12961274 completionHandler (nil );
You can’t perform that action at this time.
0 commit comments