momo12 Posted October 11, 2022 Share Posted October 11, 2022 Guys I have a quetion I used Locomotive scroll and GSAP scroll Proxy but it casues extra scroll. This only happens with Mouse wheel and not the scroll-bar! gsap.registerPlugin(ScrollTrigger); const locoScroll = new LocomotiveScroll({ el: document.querySelector(".content-wr"), smooth: true }); ScrollTrigger.scrollerProxy(".content-wr", { scrollTop(value) { return arguments.length ? locoScroll.scrollTo(value, 0, 0) : locoScroll.scroll.instance.scroll.y; }, getBoundingClientRect() { return {top: 0, left: 0, width: window.innerWidth, height: window.innerHeight}; }, pinType: document.querySelector(".content-wr").style.transform ? "transform" : "fixed" }); Link to comment Share on other sites More sharing options...
Solution momo12 Posted October 11, 2022 Author Solution Share Posted October 11, 2022 For guys who have the same problem: use this inside CSS html.has-scroll-smooth { overflow: hidden; position: fixed; left: 0; right: 0; top: 0; bottom: 0; } 1 Link to comment Share on other sites More sharing options...
Rodrigo Posted October 11, 2022 Share Posted October 11, 2022 Hi @momo12, Great to hear that you were able to solve this and thanks for sharing your solution. Hopefully this will be a good resource for other users 🥳 Happy Tweening! 1 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