michalsnik / aos

Animate on scroll library
MIT License
26.94k stars 2.6k forks source link

Some animations not working anymore after last Firefox update (FF 56+) #245

Closed tim-baecker closed 6 years ago

tim-baecker commented 7 years ago

There seems to be a problem with some animations in the new Firefox Quantum Browser.

You can test this on your own demo page: http://michalsnik.github.io/aos/

fade-up-left and fade-up-right are not animated anymore

Not sure if all the others are correct.

tim-baecker commented 7 years ago

Little update: it seems to be working fine in standard Mozilla Firefox, the problem only occurs in the Developer Edition

zitrusblau commented 7 years ago

We also noticed this issue using other animation styles (fade, fade-up) in FF 57 Stable which results in elements that are permanently hidden now. Only when scrolling past the position of the hidden element and scrolling back up will reveal the element.

Don't know if it's related but Firefox tells about switching to MutationOberserver instead of mutation events.

fritzmg commented 6 years ago

I have noticed the same with fade-up animations in current FireFox versions. However, sometimes it works and sometimes it does not. It generally seems like something is wrong with either getting the correct scroll position or offset position of the element.

michalsnik commented 6 years ago

Hey, it looks like AOS is being initialized a bit too early. You can change it by:

AOS.init({
  startEvent: 'load',
});

or by:

window.addEventListener('load', AOS.refresh);

In the upcoming v3 I'm going to refresh AOS on window load event by default, so all of those issues should go away.

If this doesn't work for you however - feel free to reopen this issue to continue the discussion :)