Prevent iOS keyboard push up

Prevent iOS keyboard push up

Hello there,

I'm creating my first App with Jquery and I don't want iOS to push my app up when someone click's on a input field. I have searched the web and appearently iOS changes the scrolltop position. 

I have set the scrolltop to 0 when focus is on but my document is still being pushed. I've now created a workaround with a settimeout so my scroll position is restored to 0 but now you can still see the screen change position really quick.

Does anyone know what event I can use so the scrollposition does not change at all?

This is my workaround:

  1. $(document).on("focus","input", function(){
  2. setTimeout(function(){
  3. $(window).scrollTop(0);
  4. },0);
  5. });