swup / scroll-plugin

A swup plugin for smooth scrolling 🏄‍♂️
https://swup.js.org/plugins/scroll-plugin
MIT License
3 stars 8 forks source link

Make `shouldResetScrollPosition` work for non-link requests #55

Closed daun closed 1 year ago

daun commented 1 year ago
options = {
  shouldResetScrollPosition: (url: string, { el, event }: { el?: Element; event?: Event }) => boolean
}

How important is this feature to you?

daun commented 1 year ago

Just realized this is completely obsolete in swup 4 — we can just set context.scroll.reset to false in the transitionStart hook.