iOS 8: UIAlertController text field losing focus when presented over UIWebView - uiwebview

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.

Related

Xcode 10 - how to pin UI element library window?

I'm laying out UI on a storyboard using the new, controversial library button which has been moved up.
This is driving me crazy - I want to be able to "PIN" this window to a secondary monitor so I can always see available components as opposing to having to click that button every single time I need an element. Currently it disappears, even on secondary monitor once I shift focus to the view controller on screen.
How do I pin the UI Elements library to be able to always see it ?
You can press the option button in keyboard and click in the library window, it's will hold
Picture of library windown

iOS 8 Keyboard Delegate Methods not getting Called

In iOS 8, When I Press Down key (Right Bottom Corner) of Keyboard,
Keyboard gets Disappear, but its delegate methods:
1.- (BOOL)textFieldShouldEndEditing:(UITextField *)textField; &
2.- (void)textFieldDidEndEditing:(UITextField *)textField;
Not getting Called for respective TextField.
But When I Click on another TextField immediately those getting called for Previous Textfield.
It was working fine in iOS 7.
Can anyone help?
This problem seems to be a bug. Positive side is that it is only on simulator and it is working correctly on a real device.

Dialog on Screen Rotation on Android 4.3

I noticed a problem that seems to only occur on Android 4.3. I'm using a AlertDialog and I dismiss and show it in the onCreate function when an orientation change occurs by storing the dialog state in onSaveInstanceState().
On other versions of android (4.0.x, 4.1.x, 4.2.x, 2.3.x), this works perfectly fine. I can rotate the device multiple times and the dialog will never disappear but on Android 4.3, if I rotate the screen enough, the dialog will disappear but instantly reappear if I rotate the screen again. I noticed that everytime the dialog disappears I'd see a GL_INVALID_OPERATION error in Logcat.
I'm wondering if this is a known bug or if there are any work arounds.
After heavy testing, it appears that this is a timing glitch. I'm not too sure of what's going on in the background but I can guess from the behavior that some GL object are not ready when attempting to display the dialog cause the dialogs not to be drawn.
I found a workaround by just declaring a handler in the class and doing a post event to the handler to show the dialog. It seems to give the activity enough time to intialize everything and the problem no longer occurs.

LWUIT + Nokia SDK 2.0 Form turning black, when swiped on screen

I'm having a strange problem with the Form of LWUIT. I am making a simple game, which you can control with the touchscreen. I just want to use simple touch events, no swipes. However, when a swipe event happens, the screen turns fully black. After some normal touch events, the picture comes back, but this is really annoying. Which property of the Form do I have to set, that this doesn't happen?
The problem does also occur on the phone itself, not only on the emulator.
Solution:
I had to override the public void pointerDragged(int x, int y) method inside my form (empty body).

Getting Nokia mobile hanged when form having choicegroup with POPUP style and Three TextField After select POPUP

I am developing an J2ME application having choicegroup with POPUP style and Three TextField . When I was tested my application on Nokia X2-01 device I found following issue regarding choicegroup POPUP
Issue :-
When I pressed OK key (Center Key) to open choicegroup list items and select something and goes back to the form that has choicegroup., left and right soft keys get hanged and no event occurs on pressing these any of the soft key.
What is the reason behind this?

Resources