All,
I am working on a web application that includes a very "tall" form. (High, this means that it is several hundred percent higher than a normal screen).
Design requires a “footer” tied to the bottom of the screen, which is ALWAYS displayed, regardless of the user's position in the form.
In other words, the footer should be visible regardless of whether the user is near the top, middle, or bottom of the form, and the form should scroll “below” it.
To implement this, I created a footer as a div with position:fixed
and bottom:0
.
This works great in all tested browsers, including Safari on iOS5.
Except for ONE error ...
If the user is at the top of the form and focuses on one of the text fields - as expected, iOS displays the keyboard.
Each time the user clicks the Next button, iOS “inserts” it into the next field.
As it progresses in form by repeatedly clicking Next , iOS automatically “scrolls” the form, so its position in the form remains in sight.
However, iOS doesn't seem to update the position:fixed
footer position:fixed
- it scrolls incorrectly along with the rest of the form.
If the user rejects the keyboard, the div is restored to the “right” place, so this is not a fatal error. But the fact that the footer moves in general is a glaring problem.
Is this a bug or a flaw with the implementation of iOS position:fixed
? Or, am I doing something wrong?
Thank you very much in advance!
[UPDATE]
Remy Sharp (aptly named) just wrote an excellent and detailed report on various errors and problems with position:fixed
on iOS / Safari: http://remysharp.com/2012/05/24/issues-with-position-fixed-scrolling -on-ios / . This is a must read if you are thinking about using position:fixed
on a site intended for iOS users ...