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.

Sidebar search refreshes page when enter is pressed

See original GitHub issue

Describe the bug

When using storybook, the user can type in the search input to filter down to matching stories. If the user hits the enter/return key, the app does a hard refresh.

To Reproduce

Steps to reproduce the behavior:

  1. Click in search input in storybook sidebar
  2. Type letters in the search input
  3. Hit the enter/return key
  4. Notice that your app did a hard refresh

Expected behavior

I would suggest that ignoring the enter key would be more helpful for those that have search + enter key muscle memory. Since the searching already happens each time a key is pressed.

Screenshots

If I were to hit enter in this state, storybook would refresh and loose my state:

image

System:

  • OS: MacOS
  • Device: Macbook Pro 2018
  • Browser: reproduced in both Chrome and Safari
  • Framework: React
  • Version: @storybook/react": "5.0.11"

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
shilmancommented, Oct 24, 2019

Son of a gun!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.0-alpha.27 containing PR #8546 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

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

1reaction
shilmancommented, Jul 10, 2019

Egads!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.2.0-alpha.39 containing PR #7342 that references this issue. Upgrade today to try it out!

You can find this prerelease 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

Search form: Make it reload the page when pressing enter ...
Since I'm actually using a 'live search' plugin from wordpress (searches without navigating to another page), and it has a bug where deleting ......
Read more >
Google Chrome won't let me refresh using the Enter key
If I am viewing a web page and wish to refresh it by clicking the URL and pressing Enter then I have to...
Read more >
Chrome keyboard shortcuts - Computer - Google Chrome Help
... Type a search engine name and press Tab. Add www. and .com to a site name, and open it in the current...
Read more >
Mac keyboard shortcuts - Apple Support
Command–Space bar: Show or hide the Spotlight search field. To perform a Spotlight search from a Finder window, press Command–Option–Space bar.
Read more >
How to Save State to LocalStorage & Persist on Refresh with ...
You can even select your stored value in the Local Storage panel, hit the Delete key, and refresh the page (or just clear...
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