password_fill: dispatch the input event
On certain login pages, like https://www.hosting24.com/cpanel-login, submitting the form after using password_fill causes an error, and you have to manually type a character and remove it in both fields before you can login. This is fixed by dispatching the input event. The change event dispatch was added to fix #2111, and dispatching only the input event fixes that issue too, but there's no harm in dispatching both events.
This commit is contained in:
parent
f6d5f79197
commit
e7b2393d87
|
|
@ -358,12 +358,14 @@ cat <<EOF
|
|||
if (isVisible(input) && (input.type == "text" || input.type == "email")) {
|
||||
input.focus();
|
||||
input.value = "$(javascript_escape "${username}")";
|
||||
input.dispatchEvent(new Event('input'));
|
||||
input.dispatchEvent(new Event('change'));
|
||||
input.blur();
|
||||
}
|
||||
if (input.type == "password") {
|
||||
input.focus();
|
||||
input.value = "$(javascript_escape "${password}")";
|
||||
input.dispatchEvent(new Event('input'));
|
||||
input.dispatchEvent(new Event('change'));
|
||||
input.blur();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue