title: Focus on input field and orientation change messes up zoom level on iOS 6 Safari
body: <p><strong>Edit</strong>: I guess <a href="https://stackoverflow.com/questions/12487899/scalespagetofit-broken-on-uiwebview-after-keyboard-is-shown/13107172">this question on Stackoverflow</a> is related to this issue.</p>
  
  <p><strong>Edit</strong>: The problem only occurs when saved to home screen not in browsing context.</p>
  
  <p><strong>Note</strong>: Everything regarding scaling and orientationchange works as expected until any input element is focused.</p>
  
  <p>I have a web app with the following meta-tag for viewport-settings:</p>
  
  <pre><code>&lt;meta name="viewport" content="user-scalable=no, width=1024"&gt;
  </code></pre>
  
  <p>Everything works great on orientationchange. But, whenever an input field is focused, zoom-level is messed up. I have tried a couple of different approach for solution out there, but am stuck. </p>
  
  <p>This is what happens when input is focused and we trigger an orientationchange:</p>
  
  <ol>
  <li><p><strong>From Portrait to Landscape</strong>
  Page is zoomed out and doesnt fill the whole viewport. If we focus on an input element when    in this mode, it zooms back and looks ok in landscape mode, however if we rotate it again, it will have the same problem as in 2.</p></li>
  <li><p><strong>From Landscape to Portrait</strong>
  Page is zoomed in and covers more than the viewport.</p></li>
  </ol>
  
  <p>Things we have tried:</p>
  
  <ol>
  <li>Meta-tag settings for viewport (initial-scale, maximum-scale, minimum-scale)</li>
  <li>Removed viewport-tag</li>
  <li>Handle orientation-change in JavaScript and set new viewport-settings dynamically on orientationchange</li>
  <li>Tried to calculate scale-level (document.documentElement.clientWidth / window.innerWidth) onorientationchange</li>
  <li>Set input-field font-size to at least 16px</li>
  </ol>
  
  <p>I am a bit stuck here and am pretty sure I am missing something obviuos so the question is:
  How do I make sure the zoom level in iOS Safari is the same post-input focus as pre-input focus?</p>