I unfortunately can't provide a reproducable URL, as this is happening only on my local environment and I guess I have something specific causing this issue, but maybe it will be possible for anyone to point out some guesses. You can see on the video what is happening when I start scroll. And this is my code:
setup() {
const goToSection = (section) => {
gsap.to(window, {
scrollTo: { y: section, autoKill: false },
duration: 1,
});
};
onMounted(() => {
gsap.registerPlugin(ScrollTrigger, ScrollToPlugin);
document.querySelectorAll('#snap-section').forEach((section) => {
ScrollTrigger.create({
trigger: section,
onEnter: () => {
console.log('onEnter', section);
goToSection(section);
},
});
ScrollTrigger.create({
trigger: section,
start: 'bottom bottom',
onEnterBack: () => {
console.log('onEnterBack', section);
goToSection(section);
},
});
});
});
return {};
},