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

Scroll behavior after back button #141

Closed
shrpne opened this issue Aug 9, 2016 · 1 comment · May be fixed by #156
Closed

Scroll behavior after back button #141

shrpne opened this issue Aug 9, 2016 · 1 comment · May be fixed by #156

Comments

@shrpne
Copy link

shrpne commented Aug 9, 2016

With disabled hash values Scrollify will scroll to top after every page load even if i press browser's back button.
But default browser behavior on back button is set scroll to the previous position, not to the top.

I think it should not scroll to top, but just recalculate position with manualScroll.calculateNearest(), because if new page opens browser will automatically set scroll position to top, and recalculating will scroll to the top section, because it is nearest to top.

I fix it by adding an option here 326c07d , but i think better way for UX is remove animating to first behavior and impliment only calculating nearest

@lukehaas
Copy link
Owner

lukehaas commented Oct 1, 2016

I'm making this this the default behaviour in the next release, think that's better than adding it as an option.
Thanks for suggesting this.

@lukehaas lukehaas closed this as completed Oct 1, 2016
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

Successfully merging a pull request may close this issue.

2 participants