mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-23 07:37:29 +09:00
Issue #2537 - Don't assume username fields appear before password fields in forms.
This commit is contained in:
parent
44f81b46b6
commit
6525b2980c
1 changed files with 3 additions and 4 deletions
|
|
@ -760,11 +760,10 @@ var LoginManagerContent = {
|
|||
}
|
||||
|
||||
if (!usernameField) {
|
||||
// Locate the username field in the form by searching backwards
|
||||
// from the first password field, assume the first text field is the
|
||||
// username. We might not find a username field if the user is
|
||||
// Locate the username field in the form by searching.
|
||||
// We might not find a username field if the user is
|
||||
// already logged in to the site.
|
||||
for (var i = pwFields[0].index - 1; i >= 0; i--) {
|
||||
for (var i = 0; i < form.elements.length; i++) {
|
||||
var element = form.elements[i];
|
||||
if (!LoginHelper.isUsernameFieldType(element)) {
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue