Looking for guidance on how to handle jump links on a page within ScrollSmoother. The default behavior of a jump link moves the scrollbar down the page but ScrollSmoother does not update its progress accordingly, allowing you to no longer scroll up from where you jumped to and scrolling too far beyond the end of the page.
See the Pen BaJrQLj by walpolea (@walpolea) on CodePen
Thank you for confirming that. I've got this in place and working for the moment, however it's poor practice to click-jack a link at all, so I may switch to a button.
document.querySelectorAll("a[href^='#']").forEach((a) => {
a.addEventListener("click", (e) => {
e.preventDefault();
ScrollSmoother.get().scrollTo(a.hash, true);
window.history.pushState({}, "", a.hash);
});
});
window.addEventListener("load", (e) => {
if (window.location.hash) {
ScrollSmoot