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

Maintain scroll position of mobile menus #19

Closed
bvaughn opened this issue Oct 6, 2017 · 4 comments
Closed

Maintain scroll position of mobile menus #19

bvaughn opened this issue Oct 6, 2017 · 4 comments

Comments

@bvaughn
Copy link
Contributor

bvaughn commented Oct 6, 2017

Originally reported by @KyleAMathews via facebook/react/issues/10952

When going quickly through pages on mobile, it'd be really nice if as you scroll down long menus e.g. in docs, if after navigating to the next page and then returning to the menu if the previous scroll position is maintained/restored.

This could be done by by storing the menu scroll position in the layout again and then passing it into the page component on render.

@KyleAMathews
Copy link
Contributor

This would also lessen the need to hide subsections of the menu.

@tsriram
Copy link
Contributor

tsriram commented Dec 1, 2017

Has this been fixed by some other change? I can't seem to reproduce this. Whenever I go back & forth between pages on mobile, it looks to be retaining the scroll position. Or I'm just overlooking something!

@bvaughn
Copy link
Contributor Author

bvaughn commented Dec 1, 2017

It's possible this was fixed as a result of replacing several of the <a> tags with gatsby-link links (aka react-router-dom links).

@bvaughn
Copy link
Contributor Author

bvaughn commented Dec 1, 2017

I am also unable to reproduce the behavior originally reported 😄 So I'll close this issue for now.

@bvaughn bvaughn closed this as completed Dec 1, 2017
gaearon pushed a commit to gaearon/reactjs.org that referenced this issue Feb 9, 2019
Перевод главной страницы
jhonmike pushed a commit to jhonmike/reactjs.org that referenced this issue Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants