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

URL hash and sidebar item don't set correctly for short sections #865

Closed
padarom opened this issue Sep 25, 2018 · 0 comments
Closed

URL hash and sidebar item don't set correctly for short sections #865

padarom opened this issue Sep 25, 2018 · 0 comments

Comments

@padarom
Copy link

padarom commented Sep 25, 2018

Bug report

When clicking on the headline of a short section within the sidebar, the URL hash and selected sidebar items don't change correctly.

Version

0.14.4, also tested on 0.12.0

Steps to reproduce

  • Create a page where the last section is too short to scroll past its header. The first section has to be long enough so the page has a scroll bar
  • Click the sidebar link of the last section

(or try it out by clicking on "Webhooks" there: https://blurple.js.org/runtime/configuration.html)

What is expected?

  • The URL hash changes to the heading you clicked on
  • The active sidebar item changes to the heading you clicked on

What is actually happening?

The URL hash and active sidebar items change, but immediately revert back to a section above.

When clicking the sidebar item again, without scrolling beforehand, the hash and active sidebar items are set correctly and don't revert.

When clicking the sidebar the first time, the page scrolls down to that section. Immediately the scroll event kicks in and sets the active sidebar item and hash to a section above. When the item is clicked again, the page is already scrolled to that section, so the scroll event doesn't fire again and the hash/active item remain set correctly.

Other relevant information

  • Your OS: macOS 10.13.6
  • Node.js version: v10.7.0
  • Browser version: Google Chrome 69.0.3497.100
  • Is this a global or local install? local
  • Which package manager did you use for the install? npm
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

1 participant