Don’t animate scrollTo of the body on iOS.

Animate body.offsetTop and body.offsetLeft works great on the desktop, but  is hugely buggy on MobileSafari. Instead, make a viewport div that fills the screen, and animate the offset on that.

I hope this helps someone, as I spent 3 hours figuring it out.

Post a comment

Copyright © marcus ramberg
nordaaker

Built on Notes Blog Core
Powered by WordPress