Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search box triggers while typing - in a text input #14441

Closed
gburning opened this issue Apr 1, 2021 · 2 comments
Closed

Search box triggers while typing - in a text input #14441

gburning opened this issue Apr 1, 2021 · 2 comments

Comments

@gburning
Copy link

gburning commented Apr 1, 2021

Description
When pressing - (hyphen) in a text input knob the search box is triggered.

Using version 6.1.21 and @storybook/addon-knobs of the same version.

I'm using a Swedish keyboard so the key that triggers / (forward slash) on english QWERTY keyboards instead writes a - (hyphen).

This keyboard layout is similar to the one I use (excluding the numpad):
http://kbdlayout.info/KBDSW/

The problem here is two-fold:

  1. The shortcut should not trigger when I'm inputting text in any way.
  2. The listed keyboard shortcut should ideally match the key I have to press.

The second problem is less important to me (even though it's confusing).

I should also note that writing / to trigger a keyboard shortcut, while fairly common in different apps, usually never works for me since I have to press the SHIFT+7 keys to write a /. So if the UI could be updated to match the key needed that is preferable.

System

  System:
    OS: macOS 10.15.7
    CPU: (4) x64 Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
  Binaries:
    Node: 12.20.1 - /usr/local/bin/node
    Yarn: 1.16.0 - /usr/local/bin/yarn
    npm: 6.14.10 - /usr/local/bin/npm
  Browsers:
    Chrome: 89.0.4389.114
    Firefox: 83.0
    Safari: 13.1.3
@ghengeveld
Copy link
Member

First problem should be resolved in 6.2: #14062

The second I don't really know how to reliably fix for any keyboard layout. We could use code rather than key so we target the location of the key rather than the / character, but that would probably be even more confusing, unless we somehow manage to render the actual character in the search box hint.

Please verify whether 6.2 resolves the issue for you.

@gburning
Copy link
Author

gburning commented Apr 9, 2021

The first problem is is fixed (tested with 6.2.7). Thanks for the quick turnaround!

As for the second problem, I agree. Maybe a better idea is to change which keys are used? I noticed that Docsearch uses cmd/ctrl+K. That seems to work well.

Regardless, the main problem is solved so feel free to close this issue.

@shilman shilman closed this as completed Apr 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants