html - 阻止 MS Edge 上的输入建议

标签 html microsoft-edge

当我开始在输入中输入某些内容(例如“te”)时,Microsoft Edge 会显示一个恼人的弹出窗口,其中包含文本“保存信息的结果”。我想隐藏它(对所有用户),所以我设置了 autocomplete=off 但我仍然看到这个烦人的框。我还尝试过 list="autocompleteOff" 并禁用所有扩展,但没有成功。

enter image description here

沙盒复制:https://codesandbox.io/s/hungry-golick-2fnlnt?file=/index.html

<input id="input-guess" 
                    type="text"
                    bind:value={guess} 
                    spellcheck="true" 
                    placeholder={$t('common.enter_a_word')}
                    autocomplete="off" 
                    list="autocompleteOff" />

最佳答案

我能够在自定义自动完成控件上重现此问题,并通过将 aria-autocomplete="both"aria-haspopup="false" 添加到我的输入字段来修复它:

您可以保留字段 ID 和其他属性autocomplete="off"pellcheck="false"

<input id="form-input-id" type="text" class="form-control" placeholder="Start typing" autocomplete="off" spellcheck="false" aria-autocomplete="both" aria-haspopup="false">

引用文献:

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-autocomplete

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup

关于html - 阻止 MS Edge 上的输入建议,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73348295/

相关文章:

html - 用于读取智能卡的 NPAPI 插件支持或类似插件

javascript - 如何在Windows 10上启动Edge with Open程序包

javascript - HTML5 音频 - 为什么不在 iOS 上工作? (不涉及自动播放)

javascript - 滚动过标题后显示图像 - 尝试不起作用?

html - 用于对定义列表项进行分组的有效 html 标记

windows - 在 ubuntu 或 windows 上运行的 MS Edge 进行端到端测试有什么区别吗?

javascript - HTML 中的自定义自关闭/未配对标签?

javascript - 在断开的链接检查器 AngularJS 中找不到图像源

javascript - 从边缘删除元素符号点

javascript - 数据 :attachment/csv download doesn't work in Edge