Menu
Is there a way to scroll the 1st selected option of a (multiple) select list to the top (or at least into view) with javascript? I tried scrollIntoView and it doesn’t seem to work. And I haven’t found any other properties, methods etc. that even look useful for this purpose.
Here’s the code I tried:
var entitySel = document.getElementById(“entitySel”);
if (entitySel.selectedIndex != -1) {
var selOption = entitySel.options[entitySel.selectedIndex];
selOption.scrollIntoView();
}