Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

footer is not getting scrolled fully when i open accordian, after refreshing the page it works fine! #520

Open
Krishit23 opened this issue Sep 22, 2023 · 0 comments

Comments

@Krishit23
Copy link

Krishit23 commented Sep 22, 2023

I am using Locomotive and ScrollTrigger.

gsap.registerPlugin(ScrollTrigger);

function loco() {
const locoScroll = new LocomotiveScroll({
el: document.querySelector(".scroll-wrapper"),
smooth: true,
multiplier: 1,
scrollFromAnywhere: true,
smartphone: {
smooth: true
},
tablet: {
smooth: true
},
});

locoScroll.on("scroll", ScrollTrigger.update);

ScrollTrigger.scrollerProxy(".scroll-wrapper", {
scrollTop(value) {
return arguments.length ? locoScroll.scrollTo(value, 0, 0) : locoScroll.scroll.instance.scroll.y;
},
getBoundingClientRect() {
return { top: 0, left: 0, width: window.innerWidth, height: window.innerHeight };
},

pinType: document.querySelector(".scroll-wrapper").style.transform ? "transform" : "fixed"

});

ScrollTrigger.addEventListener("refresh", () => locoScroll.update());
ScrollTrigger.defaults({ scroller: ".scroll-wrapper" });

ScrollTrigger.refresh();
}
loco();

@Krishit23 Krishit23 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 22, 2023
@Krishit23 Krishit23 reopened this Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant