[Select2] Select2 4.0 behaviour

Forge Component
Published on 2015-06-29 by Eduardo Luís
3 votes
Published on 2015-06-29 by Eduardo Luís
Hi Eduardo,

Thanks for providing this control, I'm using it to solve a problem I can't do with the SilkUI version.

Only issue I have is some behaviour differences to the SilkUI version that I'd like to emulate if possible.

With the SilkUI version, when you tab to a control you can immediately use the down arrow or just start typing, with this version I'm finding I have to use the mouse to click in the control before I can start using it, like it doesn't take focus.

If you know how I can 'fix' this behaviour that would be great.

Best Regards,
Hi Gavin,

thanks for using select2. 

I've never notice this behaviour difference before. Apparently i always use the mouse click.

After a little digging i find out that this is one of the many differences between versions 3.5 and 4 ( see this post on github for more info ).
After a little more digging i found this other post that presents a possible fix. I have to say that i don't like that way, it's like using brute force and could have weird side effects. But if you really nead this behaviour you could try it.

As soon i have time i will upgrade select2 to version 4.0.2. 
Apparently this problem is solved for multiple selects.

Sorry i can't 'fix' this behaviour, but in such a short time is the best i can do.

Best regards
Eduardo Luís

Thanks Eduardo, that is a great help.

Turns out the work around kills the feature of 4.0 that I need so it's still not a solution but not much I can do about it with my nuffie javascript skills :) (Trying to allow 'new' values to be entered in a lookup control, works fine except with Select2 4.0 using tags on a combo except for the focus issues)

I'll probably end up using a different pattern to achieve what I'm after.

Thanks again.