-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
NSelect better keyboard input #300
Comments
This is not a native behavior, it's hard to defined what is typing. I think explicitly activate by
Backspace and Delete is okay. Why should escape be respoinsible for clear content?
|
Just tested in Edge/Chromium 93: it doesn't open the dropdown but it does select the first item matching what was typed. What is typing? I'm gonna say: any printable character?
Escape has been reseting forms since day 1 in browsers.
OK so native behavior (just tested in Edge/Chromium 93) is to commit active item, close the dropdown and leave focus on the select element. So you can choose if you want to tab away or not, but committing focused item is native behavior. That being said, the native control is really bad and should probably not be taken as a holy grail of UX. |
I've tried too and it does work. However I think the interaction is too implicit. Maybe we can implement it but only with a low priority.
Is there any example? I haven't seen it works. When I press escape, I never expect to clear the value but just close dropdown.
chrome 91, my I agree with you about native behavior doesn't mean better UX. I refer to native behavior because some operations you proposed are what I've never seen before. (I'm not sure but they are probably not a consensus of common web users. For example |
That's strange, I just tried in Chromium 93 and it didn't work.
That's really strange, maybe it's a Mac thing? I tested on PC and when the dropdown is open and you select an item with the keyboard, it commits the selection, closes the dropdown but does not move focus. |
My coworker was expecting this as well. If you use the keyboard a lot to navigate around the interface, being able to focus the select and start typing directly is much better than having to press another key. It stops the flow |
I'll think of it. |
BTW I just discovered this lib and it's a great set of components! 👏
I'm picky about edge cases and everything working perfectly (e.g. dropdowns close to screen edges, keyboard navigation) and it works better than other components libraries I've tried!
This function solves the problem (这个功能解决的问题)
I would love better keyboard support
Expected API (期望的 API)
Can I suggest some improvements in keyboard handling?
Related:
The text was updated successfully, but these errors were encountered: