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

Scrolling up from bottom doesn't update hash #16

Open
estevanmaito opened this issue May 16, 2020 · 1 comment
Open

Scrolling up from bottom doesn't update hash #16

estevanmaito opened this issue May 16, 2020 · 1 comment

Comments

@estevanmaito
Copy link

  • Right now, if you scroll down and go back to the top, #quick-start is kept in the hash
  • If you go to https://docup.now.sh/#embeding for example and start to scroll up, technically you're already reading "Message Blocks", but the hash/active link doesn't change until you reach the header.

It's probably related to the headings being used as targets https://github.com/egoist/docup/blob/master/src/components/App.tsx#L13

Wrapping the sections with an element like a div could solve these issues.

Nice project btw 🎉

@egoist
Copy link
Owner

egoist commented May 17, 2020

Maybe we can also check block elements like ul p and find the closest h* tag while scrolling up from bottom.

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

No branches or pull requests

2 participants