【问题标题】:Chrome opens suggest password dialog on input with type number on MacOS?Chrome 会在 MacOS 上使用类型号在输入时打开建议密码对话框?
【发布时间】:2022-05-04 17:17:14
【问题描述】:

我遇到了一个问题similar to this one

我在整个表单上都有autocomplete="off",它在 Firefox 中可以正常工作,除了这个之外,大多数元素在 Chrome 中都可以正常工作:

        <mat-form-field>
          <input matInput
          autocomplete="chrome-off"
            type="number"
            formControlName="leadTimeDays"
            placeholder="Lead time days">
        </mat-form-field>

我添加了autocomplete="chrome-off" 以查看是否可以解决问题,但它仍会填充表单对话框。我尝试构建一个Stackblitz with the latest @angular/material but ran into this issue,所以我只能提供一个截图:

关于如何禁用密码自动填充的任何想法?

【问题讨论】:

    标签: html angular macos google-chrome angular-material


    【解决方案1】:

    我对此感到非常沮丧。所有各种自动完成关闭/错误和各种 javascript 答案都没有改变这一点......

    所以我只是将 dang 输入框更改为 textarea,修复列,设置 rows="1" 并禁用输入调整...

    我无法让这些建议中的任何一个起作用...所以我只是将我的输入设置为 textarea,设置为 cols="1" 并禁用调整空间。

    <textarea style="resize: none;" rows="1" cols="50" .... ></textarea>
    

    没有更多来自 chrome 的建议...

    【讨论】:

      猜你喜欢
      • 2022-10-23
      • 1970-01-01
      • 2016-08-06
      • 1970-01-01
      • 2017-02-07
      • 2015-05-24
      • 1970-01-01
      • 2012-03-15
      • 1970-01-01
      相关资源
      最近更新 更多