Hi,
I have edited the smooth scroll duration to be 2500ms and it works great in Firefox. In Chrome, however, the scrolling exhibits a very odd behavior of hanging at the beginning and then jumping to the anchor.
You can see the problem by clicking the “Buy now” button in the link below.
I spent hours trying to figure it out with no success. What could be going wrong?
Thanks!
I just took a look at the script we use for smooth scroll and I’m not sure what could be causing that. It could come down to how the browser calculates the time you’ve set – I couldn’t see a solution, unfortunately. Does the same thing happen on a blank page with nothing but text?
It also looks like the script is no longer being maintained as there’s a CSS-only method that’s widely supported now (scroll-behavior: smooth). We may opt to go the CSS route in the future instead of JS, which means things like the scroll duration would likely go away.
Thanks for the reply Tom!
I just figured it out. Apparently it is caused by including the css for the rellax-js parallax library <link rel="stylesheet" type="text/css" href="/wp-content/custom_code/rellax-master/css/main.css">
Luckily, this css is not needed for the functioning of the parallax so I removed that line.