-
Notifications
You must be signed in to change notification settings - Fork 367
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
Fix JUMP TO #1713
Fix JUMP TO #1713
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently reviewing
docs/src/App.js
Outdated
const id = hash.replace('#', ''); | ||
const element = document.getElementById(id); | ||
if (element) { | ||
element.scrollIntoView(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
window.scrollBy(0, -60);
afterward?
Made a PR to your branch with minor enhancements mparke#16 |
Scroll enhancements
docs/src/App.js
Outdated
export function init() { | ||
setTimeout(() => hashLinkScroll(), 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, missed it: setTimeout(hashLinkScroll, 0)
* Fix JUMP TO * use var * Account for header in scroll and scroll to section not header * remove uneeded function * Call without timeout * Use scrollTop and offsetHeight instead
* Fix JUMP TO * use var * Account for header in scroll and scroll to section not header * remove uneeded function * Call without timeout * Use scrollTop and offsetHeight instead
closes #1670
Fixes JUMP TO links and adds ids to methods