close
The Wayback Machine - https://web.archive.org/web/20201008015655/https://github.com/storybookjs/storybook/issues/12497
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 does not reset when switching between long docs #12497

Open
zolk opened this issue Sep 16, 2020 · 2 comments
Open

Scroll position does not reset when switching between long docs #12497

zolk opened this issue Sep 16, 2020 · 2 comments

Comments

@zolk
Copy link
Contributor

@zolk zolk commented Sep 16, 2020

Describe the bug
With multiple pure-documentation MDX docs, the scroll position of the preview window does not reset when switching between docs.

To Reproduce
Steps to reproduce the behavior:

  1. Create at least two MDX docs without stories, with content long enough to result in a scroll bar.
  2. Select the first doc in the sidebar.
  3. Scroll down the first document.
  4. Select the second doc in the sidebar.

The second doc loads with the scroll position already partially down the page.

Expected behavior
Selecting a doc should always start with the scroll position at the top of the page.

Screenshots
Screen Recording 2020-09-16 at 14 57 46

Code snippets
https://github.com/zolk/storybook-mdx-scroll-bug

System:
Reproducible in Storybook 6.0.21.

@github-actions
Copy link

@github-actions github-actions bot commented Oct 1, 2020

Automention: Hey @patricklafrance @shilman, you've been tagged! Can you give a hand here?

@hoop71
Copy link
Contributor

@hoop71 hoop71 commented Oct 2, 2020

I can take a look at this one...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.