Hi Guys,
we have a very strange issue regarding an animation which includes scrollTrigger with pinning and horizontal scrolling.
It works PERFECTLY on desktop, but on mobile it's a catastrophy. The section simply disappears as soon as it should be pinned.
The issue shows up on desktop only, if one resizes from mobiel to desktop view in Google's DevTools. On refresh, the page works nromally again.
We have tried every solution that we could find since we are searching for a solution since 3 days...
We tried providing a codepen as well, but somehow we can't reproduce it.
You can have a look for yourself right here:
atz.fewtureservicing.de
Here is our ScrollTrigger setup:
let st = ScrollTrigger.create({
animation: tl,
trigger: $('.scroll-trigger-references'),
markers: true,
id: "referenceSliderGSAP",
pin: true, // pin the trigger element while active
start: "top top", // when the top of the trigger hits the top of the viewport
end: "bottom", //tested with "+=6000" earlier
scrub: 1,
// reparentPin: true - tested as well
});
And this is the basic structure of our horizontal scrolling container:
<div class="scroll-trigger-references">
<div class="references-loop">
<div class="background--images">
</div>
<div class="reference-tile">
</div>
<div class="reference-tile reference-last-tile">
</div>
</div>
</div>
With the following CSS:
.scroll-trigger-references {
height: 100vh;
overflow-x: hidden;
will-change: transform; //tested as well :(
}
.references-loop {
height: 100%;
display: flex;
align-items: center;
overflow: hidden;
position: relative;
}
.reference-tile {
width: 100vw;
flex-shrink: 0;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
I know, that this is the worst possible way of providing code, but we are stuck with this issue for days now and can't reproduce it on codepen...
We would appreciate any hint or help with our issue!!
Thank you for your great work (Even if we don't get this issue resolved! )