on focus, open list AND on change, move to next input?

800 views
Skip to first unread message

DFreeburn

unread,
Apr 7, 2013, 8:34:15 PM4/7/13
to sel...@googlegroups.com
Is there a 'focus' event for Select2 elements? I'm trying to set my select2's to open when focused, either by tab or otherwise. However, I'm also trying to add the functionality so when a selection is chosen, by keyboard or mouse, the focus moves automatically to the next input on the page.

Can anyone offer any advice on this? I've been having trouble with the .select2-focusser element that is dynamically created - it seems to steal focus back even when I use on('change') to set focus to the next element.

Thank you for your help!

bla...@sumologic.com

unread,
Apr 9, 2013, 12:43:36 PM4/9/13
to sel...@googlegroups.com, dun...@youthunlimitedkaw.com
I'm also having trouble with this behavior, Igor do you have any help?

I've tried hooking the close event and in the callback executing something like:

$('.select2-container').removeClass('select2-container-active')

But it has no effect, as the focusser runs after this event.

Thanks,
Bill

bla...@sumologic.com

unread,
Apr 24, 2013, 1:20:48 PM4/24/13
to sel...@googlegroups.com, dun...@youthunlimitedkaw.com
On Sunday, April 7, 2013 5:34:15 PM UTC-7, DFreeburn wrote:

Did you ever find a fix for this? I'm still stuck. I put this line in the change callback of my select2 element, which I can see getting hit by stepping through in the debugger but the focus call has no effect:

idSelector.on('change', function(event) {
$('#input-column').focus();
}
});

Thanks,
Bill

Message has been deleted

y.1j...@yahoo.com

unread,
Oct 5, 2015, 8:50:39 AM10/5/15
to select2, dun...@youthunlimitedkaw.com, bla...@sumologic.com
You guys found a solution for your problem?
I'm havving the same problem, damn it!

y.1j...@yahoo.com

unread,
Oct 6, 2015, 8:49:52 AM10/6/15
to select2, dun...@youthunlimitedkaw.com
Actually to open your comboBox select2 you have to just do:
$("#yourElement").select2('open');

Caio Cavalcanti

unread,
Oct 14, 2015, 2:40:14 PM10/14/15
to select2, dun...@youthunlimitedkaw.com
I got some of it working.

I was able to work on focus, but it didn't work on IE (which was a requisite u.u)

This is what I found and worked (Chrome, FF):

$("#my_id").select2();
$("#my_id").next(".select2").find(".select2-selection").focus(function() {
    $("#my_id").select2("open");
});

Now I need to find a way for this to work in IE.

Did anyone accomplish this?

Jitt

unread,
Jul 21, 2026, 6:13:23 AM (3 days ago) Jul 21
to select2
  Working with flexible form elements often comes down to keeping the interface simple while making selection behavior predictable. The details shared in this discussion reminded me of how practical approaches used by North Mountain focus on straightforward functionality, where small design choices help create a smoother overall user experience without adding unnecessary complexity.  

Jace Vale

unread,
Jul 21, 2026, 6:14:24 AM (3 days ago) Jul 21
to select2
Choosing the right cover often comes down to balancing cargo protection with everyday convenience, which is similar to how practical design choices can improve usability in many situations. The discussion in the Select2 thread also highlights how small implementation details can have a noticeable impact on the overall experience. Paying attention to these functional aspects usually leads to solutions that are both reliable and easier to use.

Jon Briar

unread,
Jul 21, 2026, 6:15:11 AM (3 days ago) Jul 21
to select2
  Finding themed collectibles that match specific interests can take some searching, which is why resources like Think Geek are useful to compare alongside the ideas shared in this discussion. Looking at different options and community recommendations together often gives a better sense of what is worth picking up. That approach makes the conversation more practical for anyone exploring quality geek themed products.  

On Wednesday, 14 October 2015 at 23:40:14 UTC+5 Caio Cavalcanti wrote:

Jude styler

unread,
Jul 21, 2026, 6:15:58 AM (3 days ago) Jul 21
to select2
  When long term Protection is part of the discussion, it also makes sense to think about how reliable design choices affect everyday use and maintenance. That is similar to the points raised in this thread, where practical improvements and user experience are the main focus rather than unnecessary complexity. Small details often have the biggest impact on durability and overall satisfaction.  

On Wednesday, 14 October 2015 at 23:40:14 UTC+5 Caio Cavalcanti wrote:

Barakah mortgage

unread,
Jul 21, 2026, 6:17:09 AM (3 days ago) Jul 21
to select2

A practical comparison can save others time when choosing between different truck bed cover options, and the points shared about Lomax fit well into that discussion. Looking at durability, weather protection, and installation from real world experience makes the information more useful than relying only on specifications. It is always helpful when people explain what worked for them and why, since those details often answer questions others already have.

Reply all
Reply to author
Forward
0 new messages