iPhone/Safari: fixed div sticks in the middle of the page when coming back by "history.back(-1)"

Posted by praegustator on Stack Overflow See other posts from Stack Overflow or by praegustator
Published on 2012-06-10T22:35:37Z Indexed on 2012/06/10 22:40 UTC
Read the original article Hit count: 168

Filed under:
|
|
|
|

Having a problem with fixed div using iPhone's Safari. I know that in iOS 5 the functionality for position:fixed have been added. My div is positioned at the top of the screen and behave pretty good, anyway, there are some bugs during scrolling.

But what actually makes me angry - it is the position of this div after coming back to the current page clicking on javascript:history.back(-1) link. The fixed div sticks in the middle of a screen. When I try to scrool, it jumps back on the right position.

Is there any cure for the bug?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about iphone