Single element on focus type for searching without clicking

I need the following for select single

when user use key tab an arrive on the select2 dropdown the person must be able to enter the search value directly without the need of a click, use enter key or space key to open the search
At the moment the user need to click on the field then enter the value to search.

This seems possible only when using multiple but not on single
See this example


I found this solution
I have tested with jQuery v3.5.1 and Select2 v4.0.13
It not working with jQuery v3.6.0+

$(document).on('focus', '.select2-selection.select2-selection--single', function (e) {

$('select.select2').on('select2:closing', function (e) {
  $("select2").$'focus focusin', function (e) {



I saw many issues with focus ans jQuery v3.6.0+ so I’m not sure if there is a solution and how to apply it to this example.