Closed jayroh closed 13 years ago
Just a thought, haven't done any testing or investigation, but if scroll events get sent to the document when tapping the status bar, the library could listen to them and respond accordingly.
I know Mobile Safari scrolls pages to the top when you tap on the status bar, so it's possible they are sending the correct scroll event to the page at that point, but since the way pages are rendered in Mobile Safari is highly custom, it's also possible that none of the normal scroll event rules apply.
I've got an very early working version here: https://github.com/bjtitus/scrollability/commit/fd5d23d9564c83047002a2e6bbafd3e68256e05a
I'm sure it could be a lot cleaner. I'll be playing with it for the next few hours to try and get much smoother animation instead of totally jumping to the top.
@bjtitus That looks awesome, was about to do the exact same stuff, you beat me to it. Good deal!
Unfortunately, when a web app is placed on the home screen and hides the Safari chrome, the scroll event isn't fired (or the scroll-to-top doesn't occur at all, I'm not sure) when tapping the status bar. It only seems to work when the Safari chrome is visible.
Fixed.
Due to the nature of what I assume is a simulation of a native experience I'm not even sure this can be worked around, but I thought I'd bring it up (and be one of those guys filing an issue / gripe at the very beginning). But I digress.
I'm pretty used to tapping the time at the very top of the iPhone to get a long scrolling view to auto-scroll all the way back up. I won't presume to know how this works but in the case there's a solution to it, I'll throw this out there as a feature many would love to have back.
Regardless - Joe thanks for the great work.