You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using GSAP and React Slick together, React Slick's click events can affect GSAP's fixed positioning. To resolve this issue, you need to refresh GSAP's ScrollTrigger after React Slick's click events cause changes in the layout. #80
useGSAP(() => {
const tl = gsap.timeline({
scrollTrigger: {
trigger: gsapTriggerRef.current,
start: "center center",
end: "+=1000",
scrub: true,
pin: true,
markers: true,
},
});
gamesData.forEach((_, i) => {
if (i > 0) {
tl.to(gsapDivRefs.current[i - 1], { zIndex: 10 }).to(gsapDivRefs.current[i], { zIndex: 20 }, "<");
}
});
});
`
When I run it on this page, there are no issues.
After switching routes and clicking React Slick's click events, a fixed positioning offset problem occurs.
I have already included the react-slick CSS in the component, but this problem still occurs.