FIX #24429
This commit is contained in:
parent
9b141e9d1d
commit
b6d5f80d28
@ -1292,4 +1292,22 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hacky fix for a bug in select2 with jQuery 3.6.0's new nested-focus "protection"
|
||||||
|
* see: https://github.com/select2/select2/issues/5993
|
||||||
|
* see: https://github.com/jquery/jquery/issues/4382
|
||||||
|
*
|
||||||
|
* TODO: Recheck with the select2 GH issue and remove once this is fixed on their side
|
||||||
|
*/
|
||||||
|
|
||||||
|
$(document).on('select2:open', (e) => {
|
||||||
|
console.log("Execute the focus (click on combo or use space when on component");
|
||||||
|
const target = $(e.target);
|
||||||
|
if (target && target.length) {
|
||||||
|
const id = target[0].id || target[0].name;
|
||||||
|
document.querySelector(`input[aria-controls*='${id}']`).focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// End of lib_head.js.php
|
// End of lib_head.js.php
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user