2

When a user taps on a portion of a webpage in a UIWebView, I trigger a native UIAlertController asking for a password. This communication is done via the JavaScriptCore framework, so the creation and presentation of the alert is native.

Unfortunately, once the UIAlertController with the text box is presented, the keyboard briefly appears and is immediately dismissed. The user can still tap the text box to get the keyboard back. This does not happen when the alert is presented over a normal UIViewController without a UIWebView that has focus.

I suspect the UIWebView is stealing back first responder status after the alert is presented, but I don't know how to stop it.

The alert was previously a UIAlertView, and exhibited the same behavior on iOS 8. It functioned as expected in iOS 7, and the keyboard was not dismissed upon presentation. I updated to UIAlertController in the hopes of eliminating this bug, but it looks like it's specific to the UIWebView + iOS 8.

ray
  • 1,966
  • 4
  • 24
  • 39
  • May it be related to http://stackoverflow.com/questions/23833840/why-cant-i-close-or-dismiss-a-javascript-alert-in-uiwebview ? – Tom Roggero Oct 06 '15 at 00:51

0 Answers0