Hi there!
I tried combining ScrollSmoother with scrub/pin timelines.
Apparently when using a touch-device (or devtools device emulator) it gets extremely shaky when "touch" to scroll.
I was wondering if there's anything wrong with the code or that it's a bug?
This CSB is a really small example of what i'm doing in a project, where the problem is arising as well.
Steps to reproduce:
- Open devtools -> mobile view -> iphone 12
-
Thanks Cassie!
It seems like this fixes the shaky scroll:
useLayoutEffect(() => {
ScrollTrigger.normalizeScroll(true);
const smoothScroll = ScrollSmoother.create({
smooth: 1, // how long (in seconds) it takes to "catch up" to the native scroll position
// This causes buttons to scroll to top =======================================================================
// smoothTouch: 0, // much shorter smoothing time on touch devices (default is NO smoothin