Storybook: Sidebar search refreshes page when enter is pressed

Created on 1 Jul 2019  路  7Comments  路  Source: storybookjs/storybook

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"
bug good first issue help wanted ui

All 7 comments

I'll tackle this.

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.

Good golly!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.1.10 containing PR #7342 that references this issue. Upgrade today to try it out!

I'm running 5.2.3 and I am still experiencing exactly the same issue.

Should the commit in the merged PR be included in the 5.2.3 release? The git tags suggest it should have been: https://github.com/storybookjs/storybook/commit/df04048b65c0e30a6e52e39c55e92843d2474865

Screenshot from 2019-10-21 14-57-59

@cone56 Looks like it regressed. Reopening!

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.

Whoopee!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.2.6 containing PR #8546 that references this issue. Upgrade today to try it out!

Was this page helpful?
0 / 5 - 0 ratings