Fix search input not getting focus when select2 dropdown element gets focused closes #30607
This commit is contained in:
parent
de42581845
commit
ccf481c97b
|
@ -1088,6 +1088,12 @@ S2.define('select2/results',[
|
||||||
|
|
||||||
self.setClasses();
|
self.setClasses();
|
||||||
self.ensureHighlightVisible();
|
self.ensureHighlightVisible();
|
||||||
|
|
||||||
|
// NOTE: DOM's version of the object and not jQuery.
|
||||||
|
var searchField = self.$results.parents( '.select2-container' ).find( 'input.select2-search__field' )[0];
|
||||||
|
if ( 'undefined' !== typeof searchField ) {
|
||||||
|
searchField.focus();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
container.on('close', function () {
|
container.on('close', function () {
|
||||||
|
|
Loading…
Reference in New Issue