maipo Posted June 9, 2023 Share Posted June 9, 2023 I have this issue on my website, i fire the scroll to top smootly when i scroll back to the top from the footer of my div, but if I try to scroll too fast, sometimes the go to top smoothly effect doesn't work properly. I use vue.js. I tried to replicate the issue in this code pen, but it seems to be working fine there, instead on my application i have this error that the scroll to top does not work everytime that i fire the onLeaveBack function. Any Idea why? thank you so much. See the Pen bGQNjOa by maipo89 (@maipo89) on CodePen Link to comment Share on other sites More sharing options...
elegantseagulls Posted June 9, 2023 Share Posted June 9, 2023 You have overflow hidden on your html/body, but are trying to use window.scrollTo, which is contradictory. Have you looked at using GSAP's scrollTo functionality/plugin? I also see multiple scroll bars in the CodePen, so I'm guessing that's also causing an issue. For your end value you spelled 'center' incorrectly, and your end value is triggering before your start value the way you have it setup. 2 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