Modifications to, when openOnFocus is not set to true, selecting an option closes the dropdown and pressing ESC while dropdown is open closes the dropdown but does not remove focus from input