Reset activeIndex on popup close in case we highlighted another choice without selecting it

If we open the popup and select a choice without validating it, this choice will be kept the next time we open the popup. This is not what we want.

This pull request reset the activeIndex by the selected index when we close popup.