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

Add example of modify state of query string #226

Open
dxinteractive opened this issue Jun 11, 2019 · 2 comments
Open

Add example of modify state of query string #226

dxinteractive opened this issue Jun 11, 2019 · 2 comments

Comments

@dxinteractive
Copy link
Collaborator

dxinteractive commented Jun 11, 2019

But we need to deal with this gatsby bug first gatsbyjs/gatsby#12997. For some reason gatsby jumps to the top of the page if you modify the query string and dont change routes

@narration-sd
Copy link

narration-sd commented Jun 13, 2019

@dxinteractive Could have to do with what I noticed here: gatsbyjs/gatsby#12560 (comment)

I suspect the Gatsby scroll memory isn't quite doing what's needed or expected yet. There has seemed an emphasis on vocal requests for always return-to-top behaviour, and perhaps that has influenced whether the overall system is being assured to do also as others need.

@dxinteractive
Copy link
Collaborator Author

dxinteractive commented Jul 16, 2019

Ah thanks for the heads up @narration-sd - yeah I agree with what you've found, although I think I'll need to dive into how it all works to understand your observations fully.

I attempted to work around this by using shouldUpdateScroll in gatsby's browser APIs, as it gives enough information for me to dictate when a scroll position should change or not, but I couldn't use it because returning true from that function does not always result in default behaviour - contrary to what they claim: https://www.gatsbyjs.org/docs/browser-apis/#shouldUpdateScroll

I'm yet to file a bug on that because I need to redo it and find out exactly which situations it wasn't working with, and it's been too long so I can't remember :)

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

No branches or pull requests

2 participants