-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Scrollspy broken when using non-list-based navbar markup #19736
Comments
@secondstreetmedia Try JS Bin instead of JSFiddle. |
@cvrebert Edited initial post, replacing JSFiddle links with JS Bin links. |
Reposting to trigger validator: https://jsbin.com/viyexurala/edit?html,css,js,output |
I noticed this too in https://jsbin.com/dekakunuha/edit?html,css,js,output link: If there is not enough content height in the page to make the target considered as active,when you choose the last item, this will not allow the content to reach the top of the page, and you will never get the white font to mark it as target, because it is not an active target. The last item will not be marked as active if there is no extra space to place the last item content in the top. I added extra content after the last item so you can see it here. |
X-ref #21807 |
According to the documentation (http://v4-alpha.getbootstrap.com/components/navbar/), navbar implementation can be simplified from:
to:
However, unless I'm missing something, which is entirely possible, doing so appears to break Scrollspy, as the menu items no longer highlight.
Using the initial navbar implementation:
https://jsbin.com/dekakunuha/edit?html,css,js,output
Using the simplified implementation:
https://jsbin.com/viyexurala/edit?html,css,js,output
Thanks,
Tim
The text was updated successfully, but these errors were encountered: