关闭predictive文本,在网站上密码字段 [英] Turn off predictive text for password field on websites

查看:193
本文介绍了关闭predictive文本,在网站上密码字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个web视图显示一个页面来处理用户名/密码登录Android应用程序。我发现,某些键盘(如股票键盘三星杰利贝恩设备),在predictive文本正在改变中的密码字段类型。

例如,如果密码是AB!D中,predictive文本试图通过标点符号后自动进入一个空间,帮助,使之成为AB!D和将导致进入不正确的密码。唯一的原因,我知道,predictive文字是这背后是,当predictive文本被关闭通过键盘菜单设置不会发生此​​问题。

有没有一种方法,在Web表单打字时禁用predictive文字?我已经设定为密码来屏蔽入口输入类型。这不是一个Android的TextView(它是一个HTML输入),所以我没有输入平台层面的控制,而据我所知,Android不理解自动更正= off设定,一些网站使用解决iOS设备上的这个问题。

我已经注意到这个问题似乎并没有发生在其他网站一样mail.google.com。相同的键盘,不分场合,会礼貌地离开了用户的输入单独的密码领域存在。综观该网页的HTML源代码并没有透露什么特别的密码字段,只是我已经使用了相同的输入类型。

有任何的你遇到了这个问题,或者你能想到的可能的解决方案?是否有一些mail.google.com或其他网站做的,我很想念?任何帮助将大大AP preciated。

在HTML的示例是如下:

 < D​​IV数据角色=fieldcontain级=UI隐藏标签>
<标签=USER> ID< /标签>
<输入自动完成=关闭自动更正=关autocapitalize =关闭拼写检查=FALSE类型=文本名称=USERID =USER值=最大长度=50占位符= $ {userId_text}数据主题=C/>
< / DIV>
< D​​IV数据角色=fieldcontain级=UI隐藏标签>
<标签=密码>密码< /标签>
<输入自动完成=关闭自动更正=关autocapitalize =关闭拼写检查=FALSE类型=密码NAME =密码ID =密码值=最大长度=50占位符=密码的数据主题=C/>
< / DIV>
 

解决方案

根据禁用自动完成,Autocapitalize,并自动更正那里,几个不同的属性来试试。

 <输入自动完成=关闭自动更正=关autocapitalize =关闭拼写检查=FALSE/>
 

此外,并回答<一href="http://stackoverflow.com/questions/11327968/turning-off-auto-complete-for-textarea-and-inputfields-in-android-cordova-app">Turning关闭自动完成的文本区域和inputfields在Android的科尔多瓦,应用表明,&LT;输入名称=密码&GT; 是解决这奇怪的是,键入=密码不起作用。

I have an Android application that displays a page in a webview to handle a username/password login. I have found that with certain keyboards (like the stock keyboard on Samsung Jellybean devices), the predictive text is changing what the user types in the password field.

For example, if the password is "ab!d", the predictive text tries to help by automatically entering a space after the punctuation, making it "ab! d" and causes an incorrect password to be entered. The only reason I know that predictive text is behind this is that this problem does not occur when predictive text is turned OFF through the keyboard menu settings.

Is there a way to disable the predictive text when typing in the web form? I already have the input type set to "password" to mask the entry. This is not an Android TextView (it is an HTML input), so I don't have the platform level controls on the input, and as far as I know, Android does not understand the "autocorrect=off" setting that some sites use to tackle this problem on iOS devices.

I have noticed that this problem does not seem to happen on other websites like mail.google.com. The same keyboard, regardless of settings, will politely leave the user's input alone on the password field there. Looking through the HTML source on that page did not reveal anything special on the password field, only the same input type that I already use.

Have any of you run into this problem, or can you think of possible solutions? Is there something that mail.google.com or other sites do that I am missing? Any help will be greatly appreciated.

Sample of the HTML is below:

<div data-role="fieldcontain" class="ui-hide-label"  >
<label for="USER">ID</label>
<input autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"  type="text" name="USER" id="USER" value="" maxlength="50" placeholder="${userId_text}" data-theme="c"/>
</div>
<div data-role="fieldcontain" class="ui-hide-label">
<label for="password">Password</label>
<input autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"  type="password" name="password" id="password" value="" maxlength="50" placeholder="Password" data-theme="c"/>
</div>

解决方案

According to Disable Autocomplete, Autocapitalize, and Autocorrect, there a few different attributes to try.

<input autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />

Also, and answer to Turning off auto-complete for textarea and inputfields in Android Cordova-app suggests that <input name="password> is the solution. It's odd that type=password doesn't work.

这篇关于关闭predictive文本,在网站上密码字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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