Ticket #6542 (closed bug: wontfix)
iPhone Safari does not apply the scroll animation to top of the page
| Reported by: | Ayame | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | |
| Component: | effects | Version: | 1.4.2 |
| Keywords: | animation, scroll, iphone, mobile safari | Cc: | |
| Blocking: | Blocked by: |
Description
When using the code to navigate slowly back to the top of the page, Mobile Safari refuses to apply the animation and simply jumps back to the top of the page. When testing this in other browsers (even Safari desktop) it works fine.
Code used: function scrollToTop() { $('body').animate({scrollTop: 0}, "slow"); }
$('.toplink').click(scrollToTop);
Change History
comment:2 Changed 2 years ago by snover
- Priority set to undecided
- Status changed from new to closed
- Resolution set to wontfix
Thanks for the report, but this is not a jQuery bug. Mobile Safari does not support scrollTop, and there is no known workaround. There some additional discussion at commit [dab1d7467789c7092366f8231dceee0dc20d2553].
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Resetting milestone to future.