Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ios7 issues with webview focus when using keyboard html

Sencha - I have a webapp with a registration form that works correctly on Safari. However, for some reason when adding the page to home screen (using ios webview) this issue appears:

When I click on a text field the keyboard is not zooming to the specific field that was selected. In order to start writing to that text field, I need to press again on the text field.

I am using sencha.

like image 789
ItzikEdar Avatar asked Oct 01 '13 07:10

ItzikEdar


Video Answer


2 Answers

I found the solution for iOS 7. Use the following meta tag in your HTML pages:

<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, target-densityDpi=device-dpi" />
like image 91
J. Furr Avatar answered Oct 13 '22 20:10

J. Furr


I faced the same issue. In my case i am using jquery mobile and to solve this issue i added the attribute "autofocus" to the input field.
This seems to simulate a first tap on the field whereas the tap by the user opens the keyboard and he will be able to write to the field.
Hope this helps.

like image 29
George Avatar answered Oct 13 '22 20:10

George