Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[Bug]: ScrollRestoration doesn't restore horizontal page scroll #11996

Closed
alekcey0211 opened this issue Sep 13, 2024 · 1 comment
Closed

[Bug]: ScrollRestoration doesn't restore horizontal page scroll #11996

alekcey0211 opened this issue Sep 13, 2024 · 1 comment

Comments

@alekcey0211
Copy link

What version of React Router are you using?

6.26.0

Steps to Reproduce

I have a report with many columns and a horizontal scroll. I store the column sort direction in the search parameters. When I change the last column's sort direction, the page scrolls back to the start.

Expected Behavior

I'm expecting that horizontal scroll position restores too

Actual Behavior

Horizontal scroll position always reset to 0

@brophdawg11
Copy link
Contributor

ScrollRestoration is only designed to handle to vertical scroll at the moment. I'm going to convert this to a a Proposal since it's a Feature request. In the meantime you can also look at https://github.com/epicweb-dev/restore-scroll as an example of how you can build your own more advanced scroll restoration on top of the Remix APIs.

@brophdawg11 brophdawg11 removed the bug label Sep 13, 2024
@remix-run remix-run locked and limited conversation to collaborators Sep 13, 2024
@brophdawg11 brophdawg11 converted this issue into discussion #11997 Sep 13, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants