【发布时间】:2011-10-21 12:33:46
【问题描述】:
我在 Android (Phonegap) 上的 Web 视图中加载的登录页面有问题。
我为我的输入字段和表单标签使用了属性autocorrect="off" autocomplete="off" autocapitalize="off",但它不起作用。当我输入字母或数字时,设备会显示相似的单词,并且内容会上下波动。
有人知道我该如何解决这个问题吗?
干杯
【问题讨论】:
我在 Android (Phonegap) 上的 Web 视图中加载的登录页面有问题。
我为我的输入字段和表单标签使用了属性autocorrect="off" autocomplete="off" autocapitalize="off",但它不起作用。当我输入字母或数字时,设备会显示相似的单词,并且内容会上下波动。
有人知道我该如何解决这个问题吗?
干杯
【问题讨论】:
我有同样的问题,在谷歌上搜索了几个小时后,我终于找到了解决方案
使用了以下属性
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
我在 android 4.2 和它的工作上测试了它
【讨论】:
我认为这些属性不适用于 Android。它们是特定于 iPhone 的。自动更正选项通过 Android 中的主要设置进行配置。
【讨论】:
您应该尝试使用cordovasoftkeyboard 插件并在输入文本焦点上显示它,在模糊时隐藏它。这为我避免了很多奇怪的行为。但是,这将始终显示基本的软键盘(不是数字软键盘、电子邮件软键盘等...)
$(document).on({
blur : function(){
if(OS = "and")
cordova.plugins.SoftKeyboard.hide();
},
focus : function(e){
if(OS = "and"){
e.preventDefault();
cordova.plugins.SoftKeyboard.show();
if(Windows.currentWindow == null){
$('html, body').stop().animate({//permet de scroller l'input en haut
scrollTop: ($(this).offset().top)-80//header
}, 800);
}
return false;
}
}
}, ':input[type="text"],[type="number"],[type="email"]');
【讨论】:
我刚刚发现!,您只需在输入中添加:name="password" 即可解决。
【讨论】: