locomotivemtl / locomotive-scroll

🛤 Detection of elements in viewport & smooth scrolling with parallax.
https://locomotivemtl.github.io/locomotive-scroll
MIT License
7.83k stars 1.12k forks source link

Tablet/Mobile data-scroll-section #561

Open Artsem77 opened 3 months ago

Artsem77 commented 3 months ago

Hi. Please tell me if it is possible to make data-scroll-section to work on mobile device when i dont use "smooth: true" for smartphone.

customScroll = new LocomotiveScroll({ el: document.querySelector('[data-scroll-container]'), smooth: true, tablet: { breakpoint: breakpointNum, smooth: true }, smartphone: { breakpoint: breakpointNum } });

Desktop sticky elements working fine, don't work on mobile

evan-chernicky commented 3 months ago

Having the same issue here. I Tried adding smooth touch to the options: export const locomotiveScroll = new LocomotiveScroll({ initCustomTicker: (render) => { gsap.ticker.add(render); }, destroyCustomTicker: (render) => { gsap.ticker.remove(render); }, lenisOptions: { smoothTouch: true, wheelMultiplier: 1,

}

});

Also tried adding the attribute <img data-enable-touch-speed data-scroll data-scroll-speed="0.08"