Chrome是否改变了其检测信用卡字段的方式?

huangapple go评论72阅读模式
英文:

Has Chrome changed how it detects fields for credit cards?

问题

我最近升级了Chrome到最新版本(我使用的是MacOS的版本79.0.3945.88),突然间Chrome开始在不是信用卡字段的地方建议自动填充信用卡号码。例如,我有这个字段:

<label class="control-label required" for="fuel_order_outbound_number">Numero Vuelo</label>
<input type="number" id="fuel_order_outbound_number" name="fuel_order[outbound][number]"
required="required" min="0" max="9999" class="flight-number form-control">

而Chrome建议自动填充信用卡信息,见图:

Chrome是否改变了其检测信用卡字段的方式?

有其他人注意到这个问题吗?我们该怎么做才能阻止Chrome尝试自动填充这些字段?

更新:我刚刚注意到这只发生在我们网站的西班牙语版本中,而不是英语版本,所以这可能与最新的Chrome版本无关。HTML中唯一的区别是字段的标签从“Flight number”更改为“Numero vuelo”,所以似乎Chrome愚蠢地认为,如果一个表单字段的标签是“Numero”(数字),那么它就是一个信用卡字段(大脸掌声)。

英文:

I recently updated Chrome to the latest version (I am running Version 79.0.3945.88 for MacOS) and suddenly Chrome has started suggesting autofilling credit card numbers in fields which are not credit card fields. For example, I have this field:

&lt;label class=&quot;control-label required&quot; for=&quot;fuel_order_outbound_number&quot;&gt;Numero Vuelo&lt;/label&gt;
&lt;input type=&quot;number&quot; id=&quot;fuel_order_outbound_number&quot; name=&quot;fuel_order[outbound][number]&quot;
required=&quot;required&quot; min=&quot;0&quot; max=&quot;9999&quot; class=&quot;flight-number form-control&quot;&gt;

and Chrome is suggesting to autofill with credit card info, see the image:

Chrome是否改变了其检测信用卡字段的方式?

Has anyone else noticed this? What can we do to stop Chrome trying to autofill these fields?

UPDATE: I just noticed that this only happens in the Spanish version of our site, not the English version, so it may not be related to the latest Chrome version after all. The only difference in the HTML is the label of the field which changes from "Flight number" to "Numero vuelo", so it seems that Chrome stupidly assumes that if a form field is labelled "Numero" (Number) it is a credit card field (big facepalm)

答案1

得分: 0

我会假设Chrome在您的输入名称中检测到某些可能与卡支付有关的内容。更改名称应该可以解决这个问题。

您还可以为该字段设置autocomplete=false,以防止自动填充显示。

英文:

I would assume that Chrome has detected something in your input name that it might think is to do with card payments. Changing the name should resolve the issue

You could also set autocomplete=false for the field to prevent the autofill from displaying.

huangapple
  • 本文由 发表于 2020年1月3日 19:38:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/59577964.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定