Fix query selector for array name

This commit is contained in:
Roger Dueck
2023-06-06 16:52:21 -06:00
parent e16d944284
commit f26a9d6c0e

View File

@@ -1324,7 +1324,8 @@ $(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;
let id = target[0].id || target[0].name;
if (id.substr(-2) == "[]") id = id.substr(0,id.length-2);
document.querySelector('input[aria-controls*='+id+']').focus();
}
});