iOS 5 fixed positioning and virtual keyboard

Posted by jeffc on Stack Overflow See other posts from Stack Overflow or by jeffc
Published on 2011-11-01T17:32:36Z Indexed on 2012/09/27 21:37 UTC
Read the original article Hit count: 336

I have a mobile website which has a div pinned to the bottom of the screen via position:fixed. All works fine in iOS 5 (I'm testing on an iPod Touch) until I'm on a page with a form. When I tap into an input field and the virtual keyboard appears, suddenly the fixed position of my div is lost. The div now scrolls with the page as long as the keyboard is visible. Once I click Done to close the keyboard, the div reverts to its position at the bottom of the screen and obeys the position:fixed rule.

Has anyone else experienced this sort of behavior? Is this expected? Thanks.

© Stack Overflow or respective owner

Related posts about ios5

Related posts about position-fixed