Fix filling password from context menu

This commit is contained in:
varjolintu 2019-05-28 15:57:44 +03:00
parent de8ff09e78
commit 73775feb2b
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 ]