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 position is lost when markdown content is updated #124

Closed
ghoshnirmalya opened this issue Feb 11, 2022 · 3 comments
Closed

Scroll position is lost when markdown content is updated #124

ghoshnirmalya opened this issue Feb 11, 2022 · 3 comments
Labels
blocked-upstream This issue is currently blocked by another problem/limitation in an upstream package bug Something isn't working

Comments

@ghoshnirmalya
Copy link
Contributor

Details

The scroll position of the Next.js page is lost when the content is updated in the related markdown file. The issue has been discussed in a separate issue. I have created this new issue as per @schickling's request.

Context

Please see this issue for more context.

@schickling
Copy link
Collaborator

schickling commented Feb 11, 2022

Thanks a lot for opening this issue @ghoshnirmalya. I'm pretty sure this is rather a limitation with Next.js itself than a problem in Contentlayer. Would be great if someone could confirm this hypothesis and helps me explore ways to avoid this behaviour. (I've also reached out to the Next.js team about this with this video demo and Stackblitz demo.)

@schickling schickling added the bug Something isn't working label Feb 11, 2022
@schickling schickling added the blocked-upstream This issue is currently blocked by another problem/limitation in an upstream package label Mar 28, 2022
@schickling
Copy link
Collaborator

I've opened a PR with a fix in Next.js vercel/next.js#35739

@elitan
Copy link

elitan commented Apr 28, 2022

I also had this issue with Next 12.0.1. I update to the latest version (12.1.5) and that solved my issue.

I can now make changes to my .mdx files and get live-reload and the scroll position is maintained. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked-upstream This issue is currently blocked by another problem/limitation in an upstream package bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants