I need to focus on a control select2 which allows me to enter text immediately
I'm not sure why that isn't immediately working to be honest. Let me look into it and get back to you.
Allan
Sorry for the long delay in replying here. Try adding the following to the Select2 plug-in definition:
focus: function ( conf ) { conf._input.select2('open'); }
If you need to focus on a Select2 form as soon as the form opens you'd need to add a setTimeout into that function - I'm still looking into why.
setTimeout
I did this
formOptions: { main: { focus: 1 } }
and control open but I have to click to start writing
It looks like you're new here. If you want to get involved, click one of these buttons!
Answers
I'm not sure why that isn't immediately working to be honest. Let me look into it and get back to you.
Allan
Sorry for the long delay in replying here. Try adding the following to the Select2 plug-in definition:
If you need to focus on a Select2 form as soon as the form opens you'd need to add a
setTimeout
into that function - I'm still looking into why.Allan
I did this
and control open but I have to click to start writing