-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
autofocus isn't supported #3696
Comments
You should notice that the original (now hidden) |
As of version 4.0.0 I did the following modifications: In _registerEvents function, for auto focus:
In this.on('keypress'), to use tab correctly
I don't know how to add an initialization option to enable/disable these behaviours, neither I know how to contribute this to the repository, so I leave it here. |
One workaround is: |
The solution provided by @arturoribes works great in select2 4.0.3. |
@kevin-brown Any news about this issue? The solution provided by @arturoribes (#3696 (comment)) seems to be a simple and functional fix. |
@kevin-brown @alexweissman Any news about this issue? |
Is there an open pull request? I don't know much about autofocus. |
@kevin-brown @alexweissman Any news about this issue? |
@arturoribes @alvarotrigo PR merged, in next release this change will be available for all users 🎉 |
The select box when in auto-focus doesn't have any different style than when its not in auto-focus.
This might create confusion in the users.
Reproduction online
Not only that, but it also doesn't seem to work at all in Firefox. By neither using the
autofocus
attribute or calling thefocus
function.Using the arrow keys won't change the selection.
The text was updated successfully, but these errors were encountered: