lost focus of input text while keyboard appears - iOS PhoneGap Application

abduIntegral picture abduIntegral · Jan 30, 2014 · Viewed 10.8k times · Source

i have an issue while developing phone gap application on iOS 7 using cordova 2.7 with html input text. when i select input text the keyboard pops up. but can't type anything as the focus is lost. i have to select again to enter text.

can anyone help me on this.

Answer

mld picture mld · Feb 4, 2014

I ran into a similar issue where the keyboard would come up, but nothing typed shows up in the textbox. Mine was caused by css -

* {
  -webkit-user-select: none; /* prevent copy paste */
}

I fixed the issue by overriding the style for textboxes -

input[type="text"] {
    -webkit-user-select: text;
}