Animations should work fine
Animations are triggered only when I resize the browser
Does the bug depend on overflow property? How should I set overflow's value?
Does the bug may be caused by the material design lite library? (I'm using it --> https://getmdl.io/started/index.html)
Having this same issue.
me too
I had issues with this too. Solved it by calling AOS.refresh() as soon as user starts scrolling.
let scrollRef = 0;
window.addEventListener('scroll', function() {
// increase value up to 10, then refresh AOS
scrollRef <= 10 ? scrollRef++ : AOS.refresh();
});
Not exactly an ideal solution, but at least it seems to be working. I chose the value 10 arbitrarily, executing the refresh after only 1 was glitchy (if user was scrolling while page was loading, etc).
more information about html structure would be nice. codepen as example with the issue.
if you dont provide informations to reproduce the issue we can only guess...
i think you scoll an element and not the body itself.
so probably related to #223
if so you can resolve the issue with a little bit of code:
https://github.com/michalsnik/aos/issues/223#issuecomment-420336772
strongly recommended to debounce this solution.
Playing off @pestbarn's comment, I was able to solve mine, by using AOS.refresh() after a small timeout to avoid adding any event listeners.
setTimeout(() => {AOS.refresh();}, 500);
Also just a side-note, my issue started after I added lazy loading to my images
I had issues with this too. Solved it by calling
AOS.refresh()as soon as user starts scrolling.let scrollRef = 0; window.addEventListener('scroll', function() { // increase value up to 10, then refresh AOS scrollRef <= 10 ? scrollRef++ : AOS.refresh(); });Not exactly an ideal solution, but at least it seems to be working. I chose the value
10arbitrarily, executing the refresh after only1was glitchy (if user was scrolling while page was loading, etc).
Thank you very much, I got mine issue fixed with your method
Finally solved this issue by calling refresh method inside scroll listener on parent container .
For angular, add below code in app.component.ts -> ngOnInit()
$(".parent-container").on('scroll', function () {
AOS.refresh();
});
Worke
I had issues with this too. Solved it by calling
AOS.refresh()as soon as user starts scrolling.let scrollRef = 0; window.addEventListener('scroll', function() { // increase value up to 10, then refresh AOS scrollRef <= 10 ? scrollRef++ : AOS.refresh(); });Not exactly an ideal solution, but at least it seems to be working. I chose the value
10arbitrarily, executing the refresh after only1was glitchy (if user was scrolling while page was loading, etc).
Works, thanks so much!
Most helpful comment
I had issues with this too. Solved it by calling
AOS.refresh()as soon as user starts scrolling.Not exactly an ideal solution, but at least it seems to be working. I chose the value
10arbitrarily, executing the refresh after only1was glitchy (if user was scrolling while page was loading, etc).