-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Open result repository on search enter #21972
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
Conversation
c96dfd4
to
684ad79
Compare
I think the feature also needs the up and down arrow keys be able to move this selection. Also please make it so the feature only becomes active when at least 1 character has been typed into the search box. You could indicate a selection via something like border. It should be subtle. border-left: 2px solid var(--color-primary);
padding-left: calc(1em - 2px); |
I did not intend this PR to make the UI totally keyboard driven. I am not even sure how to capture the arrow keys without changing behavior on the rest of the page.
I am not sure if this is subtle enough to just indicated the onEnter. I could also just add this logic to |
007a943
to
69fff70
Compare
Why this? @silverwind I updated according to your suggestion |
Because the input element has autofocus and if someone accidentially hits enter, they might go somewhere they did not intend to go to.
I think border is probably not too good looking, probably should slightly alter background color. |
69fff70
to
d0e429e
Compare
Is there any interest in this feature or rather not? 🙃 |
Pressing enter on search opens the first result. This allows for faster navigation without any mouse involvement.
I could add a focus ring to the first element to indicate this new behavior.