In my mobile web app, clicking in the textarea box brings up the keyboard on iOS but not on Android Chrome browser. The Android keyboard flashes up and then goes away.
I have read through these posts...
Android - html input loses focus when soft keyboard opens (ASP.net)
Html input loses focus on Samsung Android when virtual keyboard appears
My understanding is that the following is happening:
- Clicking in textarea triggers a focus event
- Focus event triggers keyboard to open
- Keyboard open triggers window resize event
- Resize event triggers blur (Android only)
- Blur event triggers keyboard to close
I tried adding a focus event listener and then called focus() again, but that put me into an infinite loop where the keyboard flashes/disappears/flashes/disappears. Is there a way to make the keyboard stay active and not blur the form element during window resize? Any other tips here?