简体   繁体   English

如何在常规输入上隐藏 Android 密码建议功能区上的 Chrome

[英]How to hide Chrome on Android password suggestion ribbon on regular inputs

Chrome on Android is showing a password suggestion ribbon for unrelated inputs and I can't find any way to hide it. Android 上的 Chrome 显示不相关输入的密码建议功能区,我找不到任何隐藏它的方法。

I have a form with multiple inputs (created in React).我有一个包含多个输入的表单(在 React 中创建)。 All of them are of type "text" , "date" , "number" or other non-login form related type.它们都是"text""date""number"或其他非登录表单相关类型。 Each one of them has both attributes autocomplete="off" and aria-autocomplete="none" .它们中的每一个都具有autocomplete="off"aria-autocomplete="none"两个属性。 The surrounding form has those attributes as well.周围的形式也具有这些属性。

No matter what I do, this password ribbon appears on Chrome for Android.无论我做什么,这个密码功能区都会出现在 Chrome 上,用于 Android。 (Chrome version 103.0.5060.70, running on Android 10) and I can't seem to find any information about it online. (Chrome 版本 103.0.5060.70,在 Android 10 上运行)我似乎无法在网上找到任何有关它的信息。 No settings or experimental flags in Chrome to disable it, no HTML attributes which prompt it to be shown nor attributes to hide it. Chrome 中没有设置或实验标志来禁用它,没有提示它显示的 HTML 属性,也没有隐藏它的属性。

The ribbon causes two problems :色带导致两个问题

  1. The UX problem : Obviously, I don't want users to get password suggestions for completely unrelated inputs.用户体验问题:显然,我不希望用户获得完全不相关输入的密码建议。
  2. The Layout problem : The bottom sheet shown in the image is positioned with bottom: 0 , and the password ribbon disappears (not visually but from the layout) for less than 50 milliseconds, causing an abrupt jump.布局问题:图像中显示的底部工作表位于bottom: 0处,密码功能区消失(不是视觉上而是从布局中消失)不到 50 毫秒,导致突然跳转。 (This I could get around by manually positioning the bottom sheet to the bottom of the page with top: {window.innerHeight}px and animating that property using Framer motion with a delay of 50ms. (我可以通过使用top: {window.innerHeight}px手动将底部工作表定位到页面底部并使用 Framer 运动以 50 毫秒的延迟为该属性设置动画来解决此问题。

Can anyone tell me anything about this password ribbon?谁能告诉我有关此密码功能区的任何信息?

  • How to hide it?如何隐藏它?
  • Why is it shown?为什么会显示?
  • Is there a setting in Chrome, or a flag in chrome://flags/ to disable it? Chrome 中是否有设置,或者chrome://flags/中有一个标志来禁用它?

(See below for image of app and the password ribbon showing on an unrelated text input.) (有关应用程序的图像和在不相关的文本输入上显示的密码功能区,请参见下文。)

Image of the Ribbon in action正在运行的功能区图像

This is a Chrome bug.这是一个 Chrome 错误。 See duplicate ( Prevent Android keyboard in Chrome from showing password management on HTML input )见重复( 防止 Android 键盘在 Chrome 中显示 HTML 输入的密码管理

The workaround is to set type="search" on your input.解决方法是在您的输入中设置type="search"

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

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