Merge pull request #493 from keepassxreboot/autocomplete_fill_fix

Fix autocomplete password fill
This commit is contained in:
Sami Vänttinen 2019-04-23 13:46:14 +03:00 committed by GitHub
commit d2b5d03743
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,7 +169,8 @@ kpxcAutocomplete.create = function(input, showListInstantly = false, autoSubmit
function fillPassword(value, index) {
const fieldId = input.getAttribute('data-kpxc-id');
kpxcFields.prepareId(fieldId);
const combination = kpxcFields.getCombination('username', fieldId);
const givenType = input.type === 'password' ? 'password' : 'username';
const combination = kpxcFields.getCombination(givenType, fieldId);
combination.loginId = index;
kpxc.fillInCredentials(combination, false, false);