mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-28 01:57:30 +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) {
|
if (!usernameField) {
|
||||||
// Locate the username field in the form by searching backwards
|
// Locate the username field in the form by searching.
|
||||||
// from the first password field, assume the first text field is the
|
// We might not find a username field if the user is
|
||||||
// username. We might not find a username field if the user is
|
|
||||||
// already logged in to the site.
|
// 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];
|
var element = form.elements[i];
|
||||||
if (!LoginHelper.isUsernameFieldType(element)) {
|
if (!LoginHelper.isUsernameFieldType(element)) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue