0

I have developed an iPad web app using HTML, CSS and JavaScript. I have a simple input field on one of the screens. Whenever I click on the input field, the iPad keyboard pops up from the bottom (which is fine) but then the entire screen shifts to the left. It then stays in this position until I double tap on the iPad screen which makes the screen shift right to its original position. Does anyone know how to fix this?

4

1 に答える 1

1
$(document).ready(function(){
    $('input').bind('focus',function() {
        $(window).scrollTop(10);
        var keyboard_shown = $(window).scrollTop() > 0;
        $(window).scrollTop(0);
        if(keyboard_shown)
        {
            //your screen shifting code
        }
    });
});
于 2012-08-18T19:43:16.053 に答える