Auto selection for autocomplete

Auto selection for autocomplete

Is there a way if the autocomplete is closed and nothing has been selected to select the closest match (ie the first match on the list).