Autocomplete dropdown list selection when key board is open

Once the input field is focused a dropdown list appears. Once the user selects or tapsOne of the list item in the , it wont get selected because the keyboard closes first and hence the dropdown also vanishes. But my input field is not populated. But if i long press any of the list items it Is selected and my input field is populated