Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多
封存

Autofill does not fill username field

buongiorgio

Hello, I'm really confused about the autofill feature. I've been using this feature for years and noticed that on some website the password field is filled in, but the username is not. I searched the support pages and forum topics, and it seems that is a very common issue. According to what I read, it could be either:

  1. The webmaster decided to tell the browser not to fill in the username, but let the password to be filled in.
  2. The webpage use some out of standard approach to name the username field, so Firefox is unable to recognize it.

What annoys me is that there's no way to understand if it's the first or the second case, so you just accept it.

It would be very helpful if Firefox could:

  1. Provide a way to understand what the real problem is.
  2. Add an option to override moronic security approach of the web designer, so the "do-not-fill-in-this-field" property is overridden.

Thanks to everyone who took the time to read this!

Hello, I'm really confused about the autofill feature. I've been using this feature for years and noticed that on some website the password field is filled in, but the username is not. I searched the support pages and forum topics, and it seems that is a very common issue. According to what I read, it could be either: # The webmaster decided to tell the browser not to fill in the username, but let the password to be filled in. # The webpage use some out of standard approach to name the username field, so Firefox is unable to recognize it. What annoys me is that there's no way to understand if it's the first or the second case, so you just accept it. It would be very helpful if Firefox could: # Provide a way to understand what the real problem is. # Add an option to override moronic security approach of the web designer, so the "do-not-fill-in-this-field" property is overridden. Thanks to everyone who took the time to read this!

所有回覆 (2)

Hi. I think that Firefox expects that the username and password fields are adjacent in the DOM with no other input field between the two. So if there are other fields present then Firefox may fail the recognize either field. There are also websites that use fake input fields and copy to content to the actual field once you leave either field.

You can check the structure on a webpage in the page inspector to see what a website is using. You can right-click and select "Inspect" to open the built-in Inspector with this element selected.

The tool for diagnosing autofill results is github.com/mozilla-extensions/autofill-devtools

The issue description however matches mostly the kind of JS–heavy login flows that either expose the fields "backwards", or make conditions on key presses (i.e. a "paste" of credentials would fail the same way) — so the site coding is oftentimes a separate issue from actual autofill heuristics. firefox-source-docs.mozilla.org/browser/extensions/formautofill/docs/