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

Keyboard navigation causes glitches in the sidebar #13040

Closed
domyen opened this issue Nov 7, 2020 · 1 comment
Closed

Keyboard navigation causes glitches in the sidebar #13040

domyen opened this issue Nov 7, 2020 · 1 comment
Labels
Milestone

Comments

@domyen
Copy link
Member

domyen commented Nov 7, 2020

Describe the bug
When I use the keyboard shortcut to switch between components opt + up/down arrow I see two bugs:

  1. The shortcut loses track of which component I'm viewing
  2. The sidebar "jumps" around by scrolling back to the top before focusing on the correct position.

To Reproduce 1
Steps to reproduce the behavior:

  1. Go to live storybook on next here
  2. Press opt + down arrow to navigate through components
  3. Continue pressing opt + down arrow (you have to do this for 10+ components to see the bug)
  4. The position of the currently active story will reset and you'll end up focusing on the top component again

To Reproduce 2

  1. Go to live storybook on next here
  2. This will take you to one of the stories deep in the sidebar
  3. Press opt + down arrow to navigate through a few components then press opt + up arrow to navigate back up
  4. You'll see the sidebar start to jump around. In some cases you will not see what's currently selected in the viewport.

Expected behavior
For the sidebar to keep track of the currently selected component and for the scroll position not to jump around.

Video
https://www.loom.com/share/34a79ff8ca2345289abcfbda15fa4cdd

@shilman
Copy link
Member

shilman commented Nov 13, 2020

w00t!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.1.0-rc.2 containing PR #13097 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants