Fix password generator fill

This commit is contained in:
varjolintu 2021-01-18 07:03:47 +02:00
parent 88599acac8
commit 369d496bb8
2 changed files with 4 additions and 2 deletions

View file

@ -1417,8 +1417,8 @@ kpxc.setValue = function(field, value) {
// Sets a new value to input field and triggers necessary events
kpxc.setValueWithChange = function(field, value) {
field.value = value;
field.dispatchEvent(new Event('input', { 'bubbles': true }));
field.dispatchEvent(new Event('change', { 'bubbles': true }));
field.dispatchEvent(new Event('input', { bubbles: true }));
field.dispatchEvent(new Event('change', { bubbles: true }));
field.dispatchEvent(new KeyboardEvent('keydown', { bubbles: true, cancelable: false, key: '', char: '' }));
field.dispatchEvent(new KeyboardEvent('keypress', { bubbles: true, cancelable: false, key: '', char: '' }));
field.dispatchEvent(new KeyboardEvent('keyup', { bubbles: true, cancelable: false, key: '', char: '' }));

View file

@ -283,6 +283,8 @@ kpxcPasswordDialog.fill = function(e) {
}
kpxcPasswordDialog.input.value = password.value;
kpxcPasswordDialog.input.dispatchEvent(new Event('input', { bubbles: true }));
kpxcPasswordDialog.input.dispatchEvent(new Event('change', { bubbles: true }));
if (kpxcPasswordDialog.nextField) {
kpxcPasswordDialog.nextField.value = password.value;