mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #2070 from keepassxreboot/fix/fill_next_password_field
Fix filling next password field with password generator
This commit is contained in:
commit
b39fadd0d5
1 changed files with 14 additions and 0 deletions
|
|
@ -342,6 +342,20 @@ kpxcPasswordDialog.newFill = function(elem, password) {
|
|||
elem.value = password;
|
||||
elem.dispatchEvent(new Event('input', { bubbles: true }));
|
||||
elem.dispatchEvent(new Event('change', { bubbles: true }));
|
||||
|
||||
// Fill next password field if found
|
||||
if (kpxc.inputs.length > 0) {
|
||||
const index = kpxc.inputs.indexOf(elem);
|
||||
const nextField = kpxc.inputs[index + 1];
|
||||
|
||||
kpxcPasswordDialog.nextField =
|
||||
nextField && nextField.getLowerCaseAttribute('type') === 'password' ? nextField : undefined;
|
||||
if (kpxcPasswordDialog.nextField) {
|
||||
kpxcPasswordDialog.nextField.value = password;
|
||||
kpxcPasswordDialog.nextField.dispatchEvent(new Event('input', { bubbles: true }));
|
||||
kpxcPasswordDialog.nextField.dispatchEvent(new Event('change', { bubbles: true }));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
kpxcPasswordDialog.copyPasswordToClipboard = function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue