question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

S and A hotkeys are swapped after entering Fullscreen mode

See original GitHub issue

Describe the bug After entering full-screen mode, the first press of s or a is swapped - s opens the addon panel, and a opens the sidebar. Subsequent presses behave correctly, but the issue repeats if “Go Fullscreen” is selected again.

To Reproduce

  1. Create a temporary folder and navigate to it.
  2. npx create-react-app my-react-app, cd my-react-app, npx -p @storybook/cli sb init
  3. yarn storybook
  4. Press a; the addon panel toggles.
  5. Press s; the sidebar toggles.
  6. Press f to enter full-screen mode.
  7. Press a; the sidebar toggles.
  8. Press a again; the addon panel toggles.
  9. Press f to reset into full-screen mode again.
  10. Press s; the addon panel toggles.
  11. Press s; the sidebar toggles.

Expected behavior The shortcut keys should always target the correct panel.

System:

  • OS: Ubuntu 18.04
  • Device: 2018 Asus Vivobook
  • Browser: Chrome 72, Firefox Quantum 66
  • Framework: React
  • Version: Storybook 5.0.6, React 16.8.6

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:20 (17 by maintainers)

github_iconTop GitHub Comments

2reactions
Phoenixtoncommented, Apr 14, 2019

@jalovatt You’re very much welcome 😃 I agree with your proposal on the whole, it seems quite logical to me.

Something like this would correspond to your proposal, imo:

  1. Go to fullscreen -> isFullscreen = true, just the way it is right now
  2. TogglePanel()/ToggleNav() -> if (isFullscreen), leave fullscreen, close everything (addon panel, sidebar) and open the appropriate window (addon Panel in TogglePanel(), sidebar in ToggleNav() and so on)

This handles the fact that if you just ToggleFullscreen() and then toggle it again without touching anything else, you would revert to your old state, which is the behavior I would expect, and this doesn’t make us declare additional variables. Whaddya think?

1reaction
shilmancommented, Apr 16, 2019

Ta-da!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.28 containing PR #6525 that references this issue. Upgrade today to try it out!

Because it’s a pre-release you can find it on the @next NPM tag.

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Oops! 10 Keyboard Shortcuts Users Keep Hitting by Mistake
Accidentally pressed something on your keyboard and now you can't type properly? Here are fixes for common keyboard shortcut issues.
Read more >
Toggling full-screen for Citrix Desktops | Citrix Blogs
So, by default, the Shift+F2 hotkey has been replaced with these handy buttons to enter full-screen mode (from windowed mode). And to return...
Read more >
Remote desktop full screen mode not going full screen
I am on a Lenovo ThinkPad X1, and my winning RDP fullscreen shortcut combination was Ctrl-Alt-Fn-B. Hope this helps someone! Thursday, September ...
Read more >
Use a keyboard shortcut to switch between full screen and ...
The application will expand to full screen, hiding the menu bar, tool bar, and title bar. To restore, simply press Alt+Enter or Command+Enter...
Read more >
Why doesn't Alt+Enter fullscreen work in Windows 10?
Alt-Enter does not work for chrome (nor any other browser), as said above in the comments, it only works on microsoft related stuff...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found