简体   繁体   English

Primefaces 可编辑 p:selectOneMenu chrome 自动填充问题

[英]Primefaces editable p:selectOneMenu chrome autofill problem

I am trying to cancel chrome autofilling on my inputs using autocomplete="off" .我正在尝试使用autocomplete="off"取消对我的输入进行 chrome 自动填充。 I have a case of a <p:selectOneMenu> which have the attribute editable=true .我有一个具有属性editable=true<p:selectOneMenu>案例。 Then, when I focus on the field, chrome autocomplete propose some past texts.然后,当我专注于该领域时,chrome autocomplete 会提出一些过去的文本。 How can I cancel this autofilling knowing that the attribute autocomplete is not available for <p:selectOneMenu> ?知道属性autocomplete不适用于<p:selectOneMenu> ,如何取消此自动填充?

I have already tried to manage it through javascript, but the onfocus attribute concern dropdown click and not input area focus.我已经尝试通过 javascript 来管理它,但是onfocus属性关注的是下拉点击而不是输入区域焦点。

Unfortunately this is not PrimeFaces related.不幸的是,这与 PrimeFaces 无关。 It is that Chrome AutoFill has been a mess over the years.多年来,Chrome AutoFill 一直是一团糟。

Here is the thread you want and look at how many times its been updated or answers changed just in the last 3 years.这是您想要的主题,看看它在过去 3 年中更新了多少次或答案更改了多少次。

Disabling Chrome Autofill 禁用 Chrome 自动填充

Basically Google has gone back and forth about allowing the developer to control what gets autofilled or not and for a while they completely ignore autocomplete="off" saying developers shouldn't decide what a user wants.基本上,谷歌在允许开发人员控制什么被自动填充方面来回走动,有一段时间他们完全忽略了autocomplete="off"说开发人员不应该决定用户想要什么。 Then they added some new auto-complete flags.然后他们添加了一些新的自动完成标志。 Its a 100% mess in my opinion.在我看来,这是一个 100% 的混乱。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM