I can't reproduce your problem. Can you clarify what version of iOS? And it's unclear from the post the purpose of your code. Is the code to solve the problem? Or does it CAUSE the problem?
For iPhone, you do not need to do anything scroll fields into view, because Mobile Safari already does that for you. You probably should check first for touchscreen and not use your scrolling if touchscreen.
Fixed headers and footers can confuse it, though - this has changed with different versions.