Gregorek Posted November 16, 2022 Share Posted November 16, 2022 Hi, I started using the plugin ScrollSmoother, and I have a problem. I can’t scroll with the trackpad and touchpad on overflow-x: scroll. On mobile, it works, and on non-touch devices, it doesn’t work. Do you know how to fix it or suggest how to do it differently? Many thanks for considering my request. See the Pen poKWJLr by Grzegorz-Perkowski (@Grzegorz-Perkowski) on CodePen Link to comment Share on other sites More sharing options...
Solution GreenSock Posted November 16, 2022 Solution Share Posted November 16, 2022 Yeah, that's a tricky scenario with normalizeScroll. Try adding this: let stopPropagation = e => e.stopImmediatePropagation(); document.querySelectorAll("div").forEach(el => { if (el.scrollHeight > el.clientHeight) { el.addEventListener("wheel", stopPropagation); el.addEventListener("touchstart", stopPropagation); } }); See the Pen oNyGzNZ?editors=1010 by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted November 17, 2022 Share Posted November 17, 2022 By the way, I believe I figured out a way to solve this in the next release of ScrollSmoother which you can preview (only on CodePen or CodeSandbox) here: https://assets.codepen.io/16327/ScrollSmoother.min.js Thanks for reporting the problem. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now