iOS 5 fixed positioning and virtual keyboard

I had this problem in my application. Here’s how I’m working around it:

input.on('focus', function(){
    header.css({position:'absolute'});
});
input.on('blur', function(){
    header.css({position:'fixed'});
});

I’m just scrolling to the top and positioning it there, so the iOS user doesn’t notice anything odd going on. Wrap this in some user agent detection so other users don’t get this behavior.

Leave a Comment