Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS 7 web view text field focus change when keyboard shows up
    primarykey
    data
    text
    <h2>Update - Solution</h2> <p>@jfurr's answer in this <a href="https://stackoverflow.com/questions/19110144/ios7-issues-with-webview-focus-when-using-keyboard-html">post</a> solve the problem.</p> <p>Change this</p> <pre><code>&lt;meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0" /&gt; </code></pre> <p>into</p> <pre><code>&lt;meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, target-densityDpi=device-dpi" /&gt; </code></pre> <h2>Update - Workaround</h2> <p>But if I reduce the height of the web view for at least 37 points for 4 inches iOS 7 device (36 or less doesn't work), the focus would remain in the upper text field.</p> <pre><code>CGRect aCGRect = [webView frame]; aCGRect.size.height = [[UIScreen mainScreen] applicationFrame].size.height - 37; [webView setFrame:aCGRect]; </code></pre> <p>Don't know why it's like this.</p> <h2>Problem</h2> <p>There is a full screen web view, on which two text fields (not iOS native text field) aligned vertically in the middle of the web view. When I click on the upper text field, it is expected to see the keyboard shown up and the focus lands on the upper text field with the web view appropriately move up a little bit.</p> <p>Now the unexpected result is that when the upper text field is touched, the keyboard is able to show up, but the focus lands on the lower text field, and the cursor also move to the lower text field. However, this unexpected result happens only in iOS 7. It works as expected in iOS 6 and 5.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload