Phonegap 输入类型密码字段焦点 [英] Phonegap input type password field focus

查看:26
本文介绍了Phonegap 输入类型密码字段焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 phonegap 中开发了一个应用程序.在输入标签中,如果我给 type='text' 它运作良好.但是当我输入 type='password' 时,另一个字段会打开到当前字段.

I developed an app in phonegap . In input tag if i give type='text' it is works well . but when i give input type='password' an another field is opening over to the current field.

如何删除上述字段..

我的css是

.login-screen input.login {-webkit-border-radius:4px; width:90%; border:none; height:33px; -webkit-box-shadow: inset 0px 1px 2px 0px rgba(150, 150, 150, 0.9);
-moz-box-shadow: inset 0px 1px 2px 0px rgba(150, 150, 150, 0.9); box-shadow: inset 0px 1px 2px 0px rgba(150, 150, 150, 0.9);  padding-left:10px; margin-bottom:10px;}

html

<td align="center"><input type="text" id="vEmail" name="vEmail"  title="Enter Email" value="" alt="" class="login"  /></td>
      </tr>
      <tr>
        <td align="center" ><input type="password" id="vPassword"  name="vPassword"  title="Enter Password" value="" alt=""   class="login"/></td>
      </tr>

我希望你能通过看到这张图片了解更多!

i hope u can understand more by seeing this image!

如果我删除 i 滚动它工作正常......即使我使用了滚动,我怎样才能让它工作

if i remove the i scroll its working fine... how can i make it work even though i scroll is used

推荐答案

我已经能够通过使用 android:windowSoftInputMode="adjustNothing" 来避免这种情况.+Sandy09 关于叠加 + 位置是正确的.似乎避免这种情况的唯一好方法是防止 android 在 IME 启动时移动内容(adjustNothing),并完全防止 webview 中的内容移动.这似乎也破坏了所有 CSS3 3d/3d 转换,即使是简单的缩放和变换原点也可以破坏它.

I've been able to avoid this be using android:windowSoftInputMode="adjustNothing". +Sandy09 is right about the overlay + position. It seems the only good way to avoid this is to prevent android from moving the contents on IME start (adjustNothing), and also be preventing the contents inside the webview from moving at all. This also seems to break all CSS3 3d/3d transforms, even simple scales and transform-origin can break it.

还有更糟糕的消息:在某些时候,我的密码框工作正常,然后由于 CSS 更改,它永久地恢复了.在某些时候,如果浏览器的速度足够慢(画布),则 Window 似乎失去了跟踪输入框的能力.对我们来说,这会导致每次我们按下 IME 上的 7(七)键时都会出现 SIGSEGV.这也适用于所有 android 设备,无论版本如何.

There is worse news tho: at some point i had password boxes working fine, then due to CSS changes it came back permanently. At some point if the browser is slowed down enough (canvas) the Window seems to lose its ability to track the input box. For us, this led to SIGSEGVs every time we pressed the 7 (seven) key on the IME. This was on ALL android devices too, Regardless of version.

我放弃了所有这些,只制作了自己的 KeyboardView.我现在开心了一点.

I gave up on all of this and just made my own KeyboardView. I'm a little happier now.

这篇关于Phonegap 输入类型密码字段焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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