Merge pull request #556 from keepassxreboot/fix/password_fill

Fix filling password from context menu
This commit is contained in:
Sami Vänttinen 2019-06-01 18:27:55 +03:00 committed by GitHub
commit b4092e074e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -33,6 +33,7 @@ kpxcAutocomplete.create = function(input, showListInstantly = false, autoSubmit
kpxcAutocomplete.showList = function(inputField) {
kpxcAutocomplete.closeList();
kpxcAutocomplete.input = inputField;
const div = kpxcUI.createElement('div', 'kpxcAutocomplete-items', { 'id': 'kpxcAutocomplete-list' });
// Element position
@ -191,7 +192,7 @@ kpxcAutocomplete.fillPassword = function(value, index) {
const combination = kpxcFields.getCombination(givenType, fieldId);
combination.loginId = index;
kpxc.fillInCredentials(combination, false, false);
kpxc.fillInCredentials(combination, givenType === 'password', false);
kpxcAutocomplete.input.setAttribute('fetched', true);
};

View file

@ -1240,7 +1240,7 @@ kpxc.fillIn = function(combination, onlyPassword, suppressWarnings) {
} else if (combination.loginId !== undefined && kpxc.credentials[combination.loginId]) {
// Specific login ID given
let filledIn = false;
if (uField) {
if (uField && (!onlyPassword || _singleInputEnabledForPage)) {
kpxc.setValueWithChange(uField, kpxc.credentials[combination.loginId].login);
browser.runtime.sendMessage({
action: 'page_set_login_id', args: [ combination.loginId ]