cferdinandi / smooth-scroll

A lightweight script to animate scrolling to anchor links.
MIT License
5.49k stars 861 forks source link

Problems with the smooth scroll in wordpress site #231

Closed marcoriesco closed 8 years ago

marcoriesco commented 8 years ago

Always used the scroll smooth on all sites that I develop.

But I had a problem with this site I'm developing right now. I can not debug the error.

Just stopped working, funny that the callback around me answer, but the scroll itself does not work.

Wordpress dev link: http://dualdesign.com.br/desenv/valora/a-gestora/

cferdinandi commented 8 years ago

That's really weird! Can you throw up a version of this with the unminified JS so we can do some proper debugging in dev tools?

marcoriesco commented 8 years ago

Yes, done!

cferdinandi commented 8 years ago

The good news: I know what the cause is. The bad news: you uncovered a new "known issue" for which there is no fix.

Just like setting a height of 100%, having any sort of overflow: hidden seems to mess with Smooth Scroll's internal math. It terminates the animation immediately without scrolling a single pixel. There is no workaround other than removing the hidden overflow.

I've updated the readme accordingly, but I'm terribly sorry that I don't have a better solution here.