Hello @nastengo
Try to add this JS code to your site:
jQuery(document).on('select2:open', () => {
document.querySelector('.select2-search__field').focus();
});
Regards.
Thank you @andrewshu ! ❤️ that solve the problem!, maybe can solve the other problem … when i pass with tab key maybe the select search should be activated without make click or ‘enter’ in the select.
Hello @nastengo
This is select2 js works (not the UM). You could try to use this JS code, maybe it helps:
// on first focus (bubbles up to document), open the menu
$(document).on('focus', '.select2-selection.select2-selection--single', function (e) {
$(this).closest(".select2-container").siblings('select:enabled').select2('open');
});
// steal focus during close - only capture once and stop propogation
$('select.select2').on('select2:closing', function (e) {
$(e.target).data("select2").$selection.one('focus focusin', function (e) {
e.stopPropagation();
});
});
Regards.
Hi @nastengo
This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.
Please feel free to re-open this thread if any other questions come up and we’d be happy to help. 🙂
Regards