Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not activating link #29

Open
Yuripetusko opened this issue Sep 3, 2015 · 8 comments
Open

Not activating link #29

Yuripetusko opened this issue Sep 3, 2015 · 8 comments

Comments

@Yuripetusko
Copy link

In Helpers.js there's a code on line 75 which determines if link needs to be active. I added console log there like so

if(offsetY >= top && offsetY <= height && scroller.getActiveLink() != to) {
            console.log("yes", to)
            scroller.setActiveLink(to);

If I click a link and it scrolls to element top to bottom, then the value of "to" is wrong, but as I scroll just one pixel it is calling it again with correct "to" value. So my link doesn't get active class unless i scroll a little bit.

Surprisingly this is not the case when I am at the bottom of a page and scroll bottom to top by pressing on link

@fisshy
Copy link
Owner

fisshy commented Sep 4, 2015

interesting, will look into it

@Alexandre-Herve
Copy link

Same issue here !

@erinmeyers88
Copy link
Contributor

Same here

@a-omsk
Copy link

a-omsk commented Dec 8, 2016

Same issue here

@cryptokoala4
Copy link

This problem still exists

@bion
Copy link

bion commented Jun 9, 2017

turning smooth scrolling off fixes this for me

@thanhthao150
Copy link

still exists

@SHASWAT2000-loves-logic
Copy link

The issue still exists. However, as somebody mentioned you can turn off smooth scrolling. Then, to get the smooth effect, you can add this at the top of your style sheet - html, body{ scroll-behavior : smooth }. Hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants