Bug 1690865 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

The [heuristic](https://searchfox.org/mozilla-central/rev/9399e5832979755cd340383f4ca4069dd5fc7774/toolkit/components/passwordmgr/LoginManagerChild.jsm#1383-1386) we are using to locate the username is: 
1. Locate the password fields in the form
2. Searching backward from the first password field, assume the first text field is the username.

So if there is any text field between the real username field and the password field, we can't recognize the right username field. I think Fathom is good fit here to improve the accuracy of the current heuristic.
The [heuristic](https://searchfox.org/mozilla-central/rev/9399e5832979755cd340383f4ca4069dd5fc7774/toolkit/components/passwordmgr/LoginManagerChild.jsm#1383-1386) we are using to locate the username works as follow: 
1. Locate the password fields in the form
2. Searching backward from the first password field, assume the first text field is the username.

So if there is any text field between the real username field and the password field, we can't recognize the right username field. We can add some searching heuristics (like what we did in fathom to detect the new password field) to improve the current heuristic.

Back to Bug 1690865 Comment 0