-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
So it seems that using the element document.body no longer works on Chrome and Firefox. It still works just fine on Safari and IE.
The fix for Chrome seems to be using document.documentElement instead of document.body. The issue now is that the fix no longer works in Safari. I can include a simple if else statement to ensure each browser has a valid animatedScrollTo function called, but I wonder if there is a more elegant solution that could be used or included in the animatedScrollTo library.
Example of my animateScrollTo call after syntax change.
animatedScrollTo(
document.documentElement,
el.offsetTop,
500,
function(){console.log("animateScroll fired")}
);
thelucre, alexjfno1, tvthatsme, danilostrazzullo, kenberkeley and 1 more
Metadata
Metadata
Assignees
Labels
No labels