Sidebar search refreshes page when enter is pressed
See original GitHub issueDescribe 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:
- Click in search input in storybook sidebar
- Type letters in the search input
- Hit the enter/return key
- 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:
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:
- Created 4 years ago
- Reactions:7
- Comments:7 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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.