Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Safari scroll to top does not work on certain pages. Why?

Disclaimer: The site has meanwhile been updated, this issue does not occur anymore with the new version of the design.

On a new site I built I noticed a weird quirk in Safari (iOS 5). Usually you can tap the black bar on top of Safari to scroll to the top of any webpage. On my new website this works on the homepage, but not on single article pages.

Try it! versbeton.nl (works!) vs. versbeton.nl/2012/01/vers-vloeibaar/ (does not work!)

How can I debug such a situation? As far as I know there's no Firebug (or similar debugging tool) for iOS.

like image 439
Florian Avatar asked Jan 23 '12 11:01

Florian


1 Answers

-webkit-overflow-scrolling:touch is the problem. If you use that anywhere in your CSS, the scroll-to-top shortcut stops working. This is a known problem with iOS 5, there is no workaround unfortunately. Hopefully it will be fixed in iOS 6.

like image 107
Adam Avatar answered Oct 10 '22 02:10

Adam