diff --git a/keepassxc-browser/content/autocomplete.js b/keepassxc-browser/content/autocomplete.js index ac1a762..201f81c 100644 --- a/keepassxc-browser/content/autocomplete.js +++ b/keepassxc-browser/content/autocomplete.js @@ -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);