title: iPhone Web App - Prevent keyboard from moving/push up view - iOS8
body: <p>In <em>all versions prior to iOS8</em>, I was able to prevent the iPhone keyboard from pushing up (and destroying) my html/css/js view when the keyboard appeared by the following method:</p>
  
  <pre><code>$('input, select').focus(function(event) {
          $(window).scrollTop(0);
          // or via the scrollTo function
  });
  </code></pre>
  
  <p>Since iOS8, this no longer works. One workaround is to place this code within a setTimeOut</p>
  
  <pre><code>setTimeout(function() { $(window).scrollTop(0); }, 0);
  </code></pre>
  
  <p>But it only makes the view do a <strong>jerky motion</strong> as the view is initially pushed up by iOS, then dragged back down by my js code. preventDefault and stopPropagation does not help either.</p>
  
  <p>I've tried everything available on the web of course including my own solution posted here: <a href="https://stackoverflow.com/questions/13820088/how-to-prevent-keyboard-push-up-webview-at-ios-app-using-phonegap">How to prevent keyboard push up webview at iOS app using phonegap</a> but so far, nothing works for iOS8. Any clever ideas on how to <strong>prevent the keyboard in iOS8 to push/move the view</strong>?</p>