Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Active Tab Jumps During Click Scroll #157

Closed
Vhostymr opened this issue Sep 1, 2016 · 1 comment
Closed

Active Tab Jumps During Click Scroll #157

Vhostymr opened this issue Sep 1, 2016 · 1 comment

Comments

@Vhostymr
Copy link

Vhostymr commented Sep 1, 2016

The navigation is being used on a page that has one long content area, and 3 shorter ones currently. When one of the links is clicked, the navigation will scroll to that anchor, but after it reaches the section, it will jump to one of the subsequent short anchors. I can modify the behavior through the scroll threshold, but it still doesn't give the intended effect. What I noticed in looking around is that it appears to fire the scrollChange event during the scrolling triggered by the click event. If it enters the "section" occupied by another anchor after it reaches its intended target, it jumps there instead. This is caused by the consecutive short sections. Is there a recommend fix or alteration that can be made for short content sections so that the navigation will work as intended? Thanks.

@Vhostymr
Copy link
Author

Vhostymr commented Sep 1, 2016

Issue was resolved by updating to a newer version, adding a new parameter (offset), and modifying the default threshold to 0.25. The new parameter allowed for sticky navigation at the top of the page.

@Vhostymr Vhostymr closed this as completed Sep 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant