Open kaiyoma opened 4 years ago
This appears to be working well for me in 6.1-alpha. Can you verify on your machine/browser?
No, it's definitely still an issue. I can repro this problem on your own Storybook deploy:
https://next--storybookjs.netlify.app/official-storybook/
Click around to a few stories, then use Alt + Left and Alt + Right to try to navigate. You should encounter the bad behavior really easily. I can repro by loading the page, opening a story group, clicking to the last story, then trying to use Alt + Left to navigate.
Here's a screencast:
In the video, I first use Alt + Right to navigate forwards, which is fine, but then you can see what happens when I try to use Alt + Left to go back. The app "fights" me and tries to go forward to the current story.
@kaiyoma what browser are you using? does it happen in all browsers? in the specific repro you're showing, the accessibility tab is selected (as dictated by those A11y stories. can you repro on other stories in the same storybook where a different tab is selected? I ask because the A11y addon is running a check on the DOM with each render, which could potentially slow down the responsiveness of the app. I'm generally not able to reproduce the problem.
Happens all the time in Chrome 86 on Windows 10, but doesn't happen in the same browser in macOS. Maybe an OS-specific issue? The comments in the other (stale) thread mentioned that Storybook's keyboard shortcut interferes with the one already in use by the browser.
I can repro this problem in my project's own Storybook deployment, so I don't think it's related to your a11y stories.
Thanks for the clarification @kaiyoma . @ghengeveld @tooppaaa is this something you can look into as part of the sidebar work?
Most likely a Windows-only issue. We should probably use a different keyboard shortcut on Windows. @kaiyoma any suggestions? I hardly ever use Windows so I have no idea what makes sense there.
This shortcut interferes with history back in Firefox on Linux as well.
Describe the bug The Alt + Left keyboard shortcut doesn't really work well. It goes to the previous story, but then immediately switches back to the current story. It also conflicts with the browser itself, which uses the same shortcut for navigating backwards.
This was filed previously as issue #8759 but nothing ever happened with it.
To Reproduce Steps to reproduce the behavior:
Expected behavior Storybook should navigate to the previous story.
System