简体   繁体   English

如何禁用 iOS Chrome 密码/信用卡自动填充?

[英]How to disable iOS Chrome password/credit card autofill?

On iOS 13 Chrome, when focusing on a text input, a wide gray bar will show on top of the keyboard with only a couple buttons for password and credit card autocompletion even though the input has attributes type set to "text" and autocomplete set to "off" .在 iOS 13 Chrome 上,当专注于文本输入时,即使输入的属性type设置为"text"autocomplete设置为"off"

在此处输入图像描述

Besides being unneeded, this bar doesn't seem to decrease browser's perceived window height, so elements on the bottom of the page are getting cut off.除了不需要之外,这个栏似乎并没有降低浏览器感知的 window 高度,因此页面底部的元素被截断。

Edit: it is important to add the bar always shows up glued to the keyboard, even if the focused element is a <textarea> instead.编辑:重要的是添加栏总是粘在键盘上,即使焦点元素是<textarea> This is not an issue specific to my website.这不是我的网站特有的问题。 For instance, this bar will show on google.com if I focused on the search input.例如,如果我专注于搜索输入,这个栏将显示在 google.com 上。

Is there a way of disabling/hiding that bar?有没有办法禁用/隐藏那个栏?

For the fields that are needing no autofill then place inside the desired <input> fields autocomplete="disabled" not autocomplete="off"对于不需要自动填充的字段,请放置在所需的<input>字段中autocomplete="disabled"而不是autocomplete="off"

Somebody here discussed a workaround: Disable Chrome Autofill creditcard这里有人讨论了一种解决方法: 禁用 Chrome 自动填充信用卡

by setting the autocomplete to autocomplete="cc-csc" it forces chrome to not be able to try and autocomplete it as its not allowed to store that value, unlike autocomplete="off" which chrome can still try and auto fill.通过将自动完成设置为autocomplete="cc-csc"它会强制 chrome 无法尝试并自动完成它,因为它不允许存储该值,这与 autocomplete="off" 不同,chrome 仍然可以尝试自动填充。 I've tested this and it works.我已经对此进行了测试,并且可以正常工作。

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

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