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

15,167

-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.

Share:
15,167
Florian
Author by

Florian

Designer of webs, Rotterdammer, Frontend developer at Bureau Bolster.

Updated on June 12, 2022

Comments

  • Florian
    Florian almost 2 years

    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.

  • Florian
    Florian about 12 years
    Using Safari on my Mac won't help me debug this iOS specific problem. There's no black bar that I can tap on my Mac... Or am I misunderstanding your answer?
  • teriiehina
    teriiehina about 12 years
    yes, there ain't no black bar on OSX but using the web dev tools of Safari can help you inspect the properties of your window and its elements. And you can still activate the Dev Tools on your iPhone.
  • Florian
    Florian about 12 years
    Ah, "Debug Console" in iOS. That's a great tip! But alas: no errors that seem to have to do with this problem.
  • Florian
    Florian over 11 years
    Awesome! Was there something published about this bug or did you stumble on it by chance?
  • J Cole Morrison
    J Cole Morrison almost 11 years
    Damn. And there's absolutely NO fix for this?
  • rharper
    rharper over 10 years
    This is still an issue as of iOS 7.0.2