Merge pull request #1094 from philipreimer/fix/submit_username_when_selecting_from_autocomplete_list_via_keyboard

Fix submitting the usernam when selecting from autocomplete list via keyboard
This commit is contained in:
Sami Vänttinen 2020-11-07 11:34:04 +02:00 committed by GitHub
commit c273b3b9dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -189,8 +189,8 @@ kpxcAutocomplete.keyPress = function(e) {
if (kpxcAutocomplete.index >= 0 && items && items[kpxcAutocomplete.index] !== undefined) {
e.preventDefault();
kpxcAutocomplete.input.value = kpxcAutocomplete.elements[kpxcAutocomplete.index].value;
kpxcAutocomplete.fillPassword(kpxcAutocomplete.input.value, kpxcAutocomplete.index, kpxcAutocomplete.elements[kpxcAutocomplete.index].uuid);
const usernameValue = kpxcAutocomplete.elements[kpxcAutocomplete.index].value;
kpxcAutocomplete.fillPassword(usernameValue, kpxcAutocomplete.index, kpxcAutocomplete.elements[kpxcAutocomplete.index].uuid);
kpxcAutocomplete.closeList();
}
} else if (e.key === 'Tab') {