oi.select
oi.select copied to clipboard
Open options on 'focus'
It seems only 'click' events trigger the drop-down options list to open. Is there a way to make this open on 'focus'?
It would make it neater when you tab through forms where you rely on the options.
It works as native select — open list on click only. You can trigger click
manually
I tried calling click(event)
from function focus(event)
.
While it does open the drop-down option, the drop-down automatically closes on hovering the mouse over it for some reason. Any idea why that behavior would happen?
I'll try troubleshooting on my end. Thanks.
Thoughts on adding a custom option "openOnFocus=true/false"?
Given that the oi-select is a hybrid between a native select and a text field, being able to expand the list on focus is definitely a useful behavior. Especially on readonly fields, when you just want the user to select among the options.
While I also think an openOnFocus option would be nice, I'm afraid there could be issues when "tabbing through" fields. E.g. pressing tab to jump to the next field and then unwantedly selecting an option by tab (for example on a previously blank field), which is very undesirable.
I'm working on a project where we are using selectize and that's exactly one of the issues (among others) we're having. This is also why I'm evaluating oi-select as an alternative... which is looking great so far.
You can also open the dropdown with arrow down BTW.