-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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(scroll): use location.key for scroll behaviours #12403
Conversation
What does Also I'm assuming you verified the bug I posted doesn't happen any longer? |
And thanks for jumping on this! |
I've tested it locally and looks like it's working as expected. I haven't added any automated tests since the package doesn't seem to have any tests at the moment - happy to add tests if you think that's needed, but might need a hand! To illustrate how On first load the Hope that makes sense! Gets a bit muddy talking about this scrolling/navigation behaviour. |
…back in history to see that it is different for those
I've added tests for scroll behavior simulating example scenario with some changes (from taion/scroll-behavior#135 (comment) )
Which looks like this in cypress logs - hopefully in works in CI correctly: |
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.
Thanks @hentielouw!
Holy buckets, @hentielouw — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
Looking for some help, this update stopped the following code from working on my project.
I added this code to gatsby-browser.js to fix an issue I was having, but since this update, this code no longer works for me. Would love some help, thanks! |
What was the issue you were having and what was the above code supposed to do and how does it behave now? Can you open a new issue with answers to those questions? Thanks! That'll help us help you. |
Thanks Kyle for taking the time to respond, i opened a new issue #12997 |
Please see where the fix rolled in at 2.0.7 is breaking importantly expected 2.0.6 behavior, so that we need this regression optionable-out, thanks: #12997 (comment) |
Description
This is a simple fix to use
location.key
for saving scroll state, if it's available.Based on the suggestions found in this discussion: taion/scroll-behavior#135 (comment)
Related Issues
Fixes #12390.