以HTML格式阻止Samsung预测文本 [英] Prevent Samsung predictive text in HTML form

查看:152
本文介绍了以HTML格式阻止Samsung预测文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有文本输入字段的HTML表单。当用户键入时,我们会根据数据库中的值列表来执行AJAX请求以获得预测性文本建议。



我们显示该列表,用户可以选择一个其中;那么我们会向他们展示其余的表单。



如果您在三星Galaxy S4,内置浏览器或Chrome或Firefox上查看我们的网页,该设备的预测输入建议也显示为用户类型。例如看截图:





很容易个人用户在自己的手机设置中禁用此功能。但是,我们希望将其设置为对所有用户始终禁用此字段。我们已经做了以下所有事情,但似乎并没有阻止它出现:

  < input type =textautocomplete =offautocorrect =offautocapitalize =offspellcheck =false> 

您也可以在此查看



根据Safari的说法,我们已经尝试了不同的东西,并且在移动设备上似乎没有机会这样做。开发人员文档有支持 https://developer.apple.com/library /safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/Attributes.html ,但它似乎与iOS的桌面Safari更相关。



此外,拼写检查可以执行此操作,但目前,根据 http://caniuse.com/#feat=spellcheck-attribute


部分支持手机浏览器从他们的操作系统得到的结果通常
内置拼写检查,而不是使用波浪下划线
表示拼写错误的单词。 spellcheck =false在这些浏览器中似乎没有
的效果。



I have an HTML form with a text input field. As the user types, we do AJAX requests to get predictive text suggestions, based on a list of values in our database.

We display that list and the user can select one of them; then we show them the rest of the form.

If you're viewing our web page on a Samsung Galaxy S4, in its built-in browser or Chrome or Firefox, the device's predictive input suggestions also appear as the user types. e.g. see the screenshot:

It's easy enough for an individual user to disable this in the settings on their own phone. However we want to make it so it's always disabled for this field for all users. We're already doing all the following, which don't seem to prevent it appearing:

<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false">

You can also see this here.

Any suggestions?

解决方案

I've tried different things and it seems that on mobile you currently have no chance to do this in a proper way.

According to Safari Developer Docs there is support https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/Attributes.html but it seems that this is more related to the Desktop Safari than iOS.

Additionally, spellcheck could do it but currently, according to http://caniuse.com/#feat=spellcheck-attribute :

The partial support in mobile browsers results from their OS generally having built-in spell checking instead of using the wavy underline to indicate misspelled words. spellcheck="false" does not seem to have any effect in these browsers.

这篇关于以HTML格式阻止Samsung预测文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆