1document.addEventListener('DOMContentLoaded', () => { 2 var selects = document.getElementsByClassName("select2-search__field"); 3 const arr = Array.from(selects); 4 arr.forEach(function(item) { 5 item.addEventListener("keyup", focus); 6 item.addEventListener("keydown", focus); 7 item.addEventListener("focus", focus); 8 item.setAttribute("role", "combobox"); 9 item.setAttribute("tabindex", "0"); 10 }); 11 function focus(event) { 12 var keyCode = event.keyCode; 13 if (keyCode === 38 || keyCode === 40) { 14 document.getElementsByClassName("select2-results__option--highlighted")[0].focus(); 15 } 16 if (document.getElementsByClassName("select2-results__options").length > 0) { 17 var items = document.getElementsByClassName("select2-results__option"); 18 const itemsArray = Array.from(items); 19 itemsArray.forEach(function(item) { 20 item.setAttribute("tabindex", "-1"); 21 }); 22 } 23 var choices = document.getElementsByClassName("select2-selection__choice"); 24 const choicesArray = Array.from(choices); 25 choicesArray.forEach(function(item) { 26 item.setAttribute("tabindex", "-1"); 27 }); 28 } 29});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.