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

Clicking item in sidebar table of contents twice hides target heading #1907

Open
JackMorganNZ opened this issue Jun 9, 2022 · 0 comments
Open
Labels
bug Something isn't working frontend Related to the website the user sees javascript Pull requests that update Javascript code

Comments

@JackMorganNZ
Copy link
Member

This is because the logic that moves the heading below the navbar is triggered by the JS event hashchange which isn't triggered if the hash is the same.

Two possible solutions:

  1. Prevent triggering the jump to the heading anchor if clicking on the currently selected heading, however this prevents jumping to the top of a long section.
  2. Switch page structure to use same structure of the CS Field Guide, where the content element doesn't go behind the navbar. However this would require extra work to get the homepage navbar/image effect to work correctly.
@JackMorganNZ JackMorganNZ added bug Something isn't working javascript Pull requests that update Javascript code frontend Related to the website the user sees labels Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Related to the website the user sees javascript Pull requests that update Javascript code
Development

No branches or pull requests

1 participant