Remove call to requestAnimationFrame (#53)
This commit is contained in:
@@ -132,31 +132,29 @@
|
|||||||
// There is likely a field asking for OTP code, so do not submit form just yet
|
// There is likely a field asking for OTP code, so do not submit form just yet
|
||||||
password_inputs[1].select();
|
password_inputs[1].select();
|
||||||
} else {
|
} else {
|
||||||
window.requestAnimationFrame(function() {
|
// try to locate the submit button
|
||||||
// try to locate the submit button
|
var submit = find(SUBMIT_FIELDS, loginForm);
|
||||||
var submit = find(SUBMIT_FIELDS, loginForm);
|
|
||||||
|
|
||||||
// Try to submit the form, or focus on the submit button (based on user settings)
|
// Try to submit the form, or focus on the submit button (based on user settings)
|
||||||
if (submit) {
|
if (submit) {
|
||||||
if (request.autoSubmit) {
|
if (request.autoSubmit) {
|
||||||
submit.click();
|
submit.click();
|
||||||
} else {
|
|
||||||
submit.focus();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// There is no submit button.
|
submit.focus();
|
||||||
// We need to keep focus somewhere within the form, so that Enter hopefully submits the form.
|
}
|
||||||
var password = find(PASSWORD_FIELDS, loginForm);
|
} else {
|
||||||
if (password) {
|
// There is no submit button.
|
||||||
password.focus();
|
// We need to keep focus somewhere within the form, so that Enter hopefully submits the form.
|
||||||
} else {
|
var password = find(PASSWORD_FIELDS, loginForm);
|
||||||
var username = find(USERNAME_FIELDS, loginForm);
|
if (password) {
|
||||||
if (username) {
|
password.focus();
|
||||||
username.focus();
|
} else {
|
||||||
}
|
var username = find(USERNAME_FIELDS, loginForm);
|
||||||
|
if (username) {
|
||||||
|
username.focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// finished filling things successfully
|
// finished filling things successfully
|
||||||
|
Reference in New Issue
Block a user