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

Keyboard shortcut triggers autofocus on search input field #972

Open
pierreminik opened this issue Oct 21, 2021 · 2 comments
Open

Keyboard shortcut triggers autofocus on search input field #972

pierreminik opened this issue Oct 21, 2021 · 2 comments
Labels

Comments

@pierreminik
Copy link

Expected Behavior

Keystrokes in a table view (ie. viewing a collection) triggers an autofocus on the Search everywhere...-input field.
Pressing cmd + c focuses the input and adds the c to the input. I'd expect the autofocus to ignore typing a keyboard shortcut with a modifier key.

Current Behavior

Pressing a keyboard shortcut like cmd + c or cmd + f auto focuses the search input field.

Possible Solution

Ignore the key event if keyEvent.metaKey is true. I made a fork and created a new branch here with a suggested solution. Beware: I haven't tested the solution as I couldn't build the Dockerfile or run npm install to run it locally without docker.

Steps to Reproduce

  1. In the Data tab, select an index and a collection
  2. Press cmd + c to copy any selected text values
  3. The search input is focused

Context (Environment)

Kuzzle version:
Node.js version:
Admin Console version: Current deployment on http://next-console.kuzzle.io

@pierreminik
Copy link
Author

pierreminik commented Oct 21, 2021

In the same branch I also updated the json example given on the Create Profile-screen so the restrictedTo property matches the expected array value.

Let me know if you want me to make a upstream pull request. 😊

@Aschen
Copy link
Contributor

Aschen commented Oct 21, 2021

Thanks for the feedback!

Actually I've looked at your solution and it should work, a PR would be indeed very much appreciated yes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants