If you cannot fix the autocomplete to do this per default then you can do this
https://jsfiddle.net/mplungjan/c3hkfLyq/
document.getElementById("myInput").addEventListener("keydown",function(e) {
const scroll = ["ArrowUp","ArrowDown"].includes(e.key)
const list = document.getElementById("myInputautocomplete-list")
if (scroll) {
document.querySelector(".autocomplete-active").scrollIntoView()
}
})
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…