Go back to multiselect with most recently selected item

I've been chatting with Lauren on this.
Let's say we start with a 1000 numbers/items in the multiselection box, an user selected no.1, no.5, and no.100th number/items, then doing something else. When the user comes back to select another group of numbers/items which are no.110, no.115, the user have to scroll all the way down to the no.110th INSTEAD OF starting with the most recently selected item-no.100th.

I failed to use the code below to set the default value to the most recently selected item:


Adding in a visual example of what @janicewa mentions here: