You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In pseudo code, we could add something like this at the beginning of function
if element isdocument.bodythenanimatedScrollTo(document.documentElement, samePosition, sameTime)
With that change we will be animating both properties at same time for compatibility and user of library will be still using just document.body to initialize animation (just like in the example)
That means calling everything twice, including requestAnimationFrame. In my head, it makes more sense to also accept an array of values and in that case iterate the values. Change the recommendation to use [ document.body, document.documentElement ] and it's done.
Firefox will not scroll on
body
but onhtml
: http://stackoverflow.com/questions/12222485/why-to-use-html-body-for-scrolltop-instead-of-just-htmlWith the current code examples it's impossible to know which one to use, and one has to correct that manually.
The text was updated successfully, but these errors were encountered: