搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

Does Firefox address autofill fill in inputs that are hidden with CSS? If so, should it?

  • 4 个回答
  • 1 人有此问题
  • 41 次查看
  • 最后回复者为 regularmike

more options

I ran into an issue today where a honeypot field in a form I created was populated by the Firefox address autofill feature. This was causing a form submission to be rejected for a human user who was trying to register on my website. The field was a normal input element of type "text" but the containing div was hidden with CSS. When I tested the form with Chrome and Edge's address autofill feature it didn't populate it. Is there a reason this behavior is different in Firefox? Does it also fill in inputs of type "hidden?"

I ran into an issue today where a honeypot field in a form I created was populated by the Firefox address autofill feature. This was causing a form submission to be rejected for a human user who was trying to register on my website. The field was a normal input element of type "text" but the containing div was hidden with CSS. When I tested the form with Chrome and Edge's address autofill feature it didn't populate it. Is there a reason this behavior is different in Firefox? Does it also fill in inputs of type "hidden?"

所有回复 (4)

more options

Perhaps you're right. You can read some discussions about it under these bug reports:

more options

There are some interesting points made in the first report. "Hidden" is indeed hard to define. However, not filling an input that appears to be hidden seems a lot safer than filling it. If there is a CSS rule to hide an input or its parent element I wish it would just err on the side of caution and not fill it like the other clients seem to.

more options

That is certainly a point one could add to one of the relevant bug reports.

more options

Good idea. Done. This was resolved for me by using a name that's unrelated to address information for my honeypot field.