【问题标题】:after upgrading Google Chrome to version 63.0.3239.84 I have started receiving errors and warnings将 Google Chrome 升级到版本 63.0.3239.84 后,我开始收到错误和警告
【发布时间】:2018-05-30 06:54:09
【问题描述】:

将 Google Chrome 升级到版本 63.0.3239.84 后,我开始在控制台中收到错误和警告,例如:

[DOM] Found 3 elements with non-unique id #SMTPSetting:
[DOM] Input elements should have autocomplete attributes (suggested: "current-password"):
[Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952 

【问题讨论】:

    标签: google-chrome dom console warnings


    【解决方案1】:

    只需在输入中添加autocomplete 属性,警告就会消失。例如:

    <div class="form-group">
        <input type="email" class="form-control" autocomplete="email" required>
        <input type="password" class="form-control" autocomplete="password" required>
    </div>
    

    如果您没有或只是不想为属性autocomplete 设置值,请使用autocomplete="foo",这样警告消息就会消失。

    更多信息请访问:https://chromereleases.googleblog.com/2017/12/stable-channel-update-for-desktop.html

    【讨论】:

    • 如何让 Chrome 关闭它而不实际更改我的代码以使用自动完成功能?
    • hmmm..我没想到这两个主题是相关的...无论如何,我发现这种技术(返回单击特定警告)有效...superuser.com/questions/737390/…
    • 当我明确设置autocomplete="off" 时,它仍然给我警告,有点烦人。我有一个一次性信息字段,自动填充在这种情况下会损害用户体验。
    • 嗨@Ade,如果您不打算放置任何自动完成功能,只需放置 autocomplete="foo" 以使警告消失。 off 值不存在。
    • @Ade 感谢您的链接。他们建议我们使用自动完成并避免 offfoo。为其添加属性和标识符,这是在控制台中忘记警告的唯一选择...
    【解决方案2】:

    他们似乎最近添加了这个选项,它隐藏了推荐: -来源:推荐 在过滤器框中。

    偶然发现的。过滤框还支持使用 Ctrl+Space (Windows) 自动完成。

    【讨论】:

    • 有没有用过滤器隐藏的语法?添加“source:recommendation”仅显示推荐。
    猜你喜欢
    • 2020-06-09
    • 1970-01-01
    • 2021-05-05
    • 2016-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-20
    • 2015-10-20
    相关资源
    最近更新 更多