热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Phonegap输入类型密码字段焦点。-Phonegapinputtypepasswordfieldfocus

Idevelopedanappinphonegap.Ininputtagifigivetypetextitisworkswell.butwhenigi

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.

我用phonegap开发了一个应用。在输入标签中,如果我输入type='text'它会工作得很好。但是,当我输入type='password'时,另一个字段将打开到当前字段。

how can i remove the above field..

我该如何删除上面的字段

my css is

我的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

html


      
      
        
      

i hope u can understand more by seeing this image!

我希望你能通过这张照片了解更多!

In screen other field is overlaying in password field

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

如果我移除i滚动条,它会正常工作……我怎样才能使它工作,即使我卷轴被使用?

4 个解决方案

#1


7  

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.

我已经能够避免使用android:windowSoftInputMode="调节器"。+Sandy09是关于叠加+位置的。避免这种情况的唯一好办法似乎是阻止android移动IME start(可调启动)上的内容,同时也阻止webview内的内容移动。这似乎也打破了所有的CSS3 3d/3d转换,甚至简单的尺度和转换源都可以打破它。

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.

更糟糕的消息是:在某个时候,我的密码框可以正常工作,但是由于CSS的改变,密码框永久地返回了。在某些时候,如果浏览器速度足够慢(画布),窗口似乎就失去了跟踪输入框的能力。对我们来说,这导致每次我们按7(7)键在IME上时都出现了sigsegv。这也适用于所有android设备,无论版本如何。

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

我放弃了这一切,只做了我自己的KeyboardView。我现在更开心了。

#2


14  

Here is an easier solution!

这里有一个更简单的解决方案!

Change

改变

to


In your CSS style sheet(s).

在CSS样式表中。

input.password-field {
     -webkit-text-security: disc;
}

http://css-infos.net/property/-webkit-text-security

http://css-infos.net/property/-webkit-text-security

I am building a PhoneGap (cordova) ANdroid app and i spent about 18 hours so far trying to find a fix, destroying the iScroll instance kind of works if the password field is on the screen and not below the scrolling area... The webkit text security CSS property is a much better fix and i've done some research on this CSS property and it seems like all the Android versions run webkit so you should be good to go for all versions of Android with this fix!

我正在构建一个PhoneGap (cordova) ANdroid应用程序,到目前为止,我花了大约18个小时试图找到一个解决方案,如果密码字段在屏幕上而不是在滚动区域下方,那么iScroll实例就会被破坏。webkit文本安全CSS属性是一个更好的修复,我已经对这个CSS属性做了一些研究,看起来所有的Android版本都运行webkit,所以你应该用这个修复去寻找所有版本的Android !

#3


1  

Check out this fiddle for the Login/Register page.... Use password field like that as given in the fiddle

看看这个小提琴为登录/注册页面....使用像小提琴中给出的密码字段

http://jsfiddle.net/elijahmanor/3Rmdm/1/

http://jsfiddle.net/elijahmanor/3Rmdm/1/

#4


1  

This is not the problem with Phonegap.. this issue is also occurs in the webview.. in many devices like (samsung, sony, and emulator etc) the password field is overlay with the another field and rest of fields works fine. coming to HTC this issue will rises in the all type of fields..

这不是Phonegap的问题。这个问题也出现在webview中。在许多设备(如三星、索尼、模拟器等)中,密码字段与另一个字段重叠,其余字段工作正常。进入HTC,这个问题将会在所有类型的领域上升。

normally this overlay field covers exact to the bottom field and looks like only one field. but when we use the iscroll to apply scrolling property, the ovelay misplace as in the above fig.

通常,这个覆盖字段覆盖在底部字段上,看起来只有一个字段。但是当我们使用iscroll来应用滚动属性时,ovelay会出现错误,如图所示。

solution: onfocus on the field disable the iscroll and onblur refreshing the iscroll is an temporal solution which works fine.

解决方案:onfocus on the field disable the iscroll and onblur清爽the iscroll是一个暂时的解决方案,效果很好。

but this is not right solutions in all cases.

但这并不是所有情况下的正确解决方案。

waiting and trying for better solution..

等待并尝试更好的解决方法


推荐阅读
  • Spring特性实现接口多类的动态调用详解
    本文详细介绍了如何使用Spring特性实现接口多类的动态调用。通过对Spring IoC容器的基础类BeanFactory和ApplicationContext的介绍,以及getBeansOfType方法的应用,解决了在实际工作中遇到的接口及多个实现类的问题。同时,文章还提到了SPI使用的不便之处,并介绍了借助ApplicationContext实现需求的方法。阅读本文,你将了解到Spring特性的实现原理和实际应用方式。 ... [详细]
  • XML介绍与使用的概述及标签规则
    本文介绍了XML的基本概念和用途,包括XML的可扩展性和标签的自定义特性。同时还详细解释了XML标签的规则,包括标签的尖括号和合法标识符的组成,标签必须成对出现的原则以及特殊标签的使用方法。通过本文的阅读,读者可以对XML的基本知识有一个全面的了解。 ... [详细]
  • 标题: ... [详细]
  • 本文介绍了Android 7的学习笔记总结,包括最新的移动架构视频、大厂安卓面试真题和项目实战源码讲义。同时还分享了开源的完整内容,并提醒读者在使用FileProvider适配时要注意不同模块的AndroidManfiest.xml中配置的xml文件名必须不同,否则会出现问题。 ... [详细]
  • 本文介绍了iOS数据库Sqlite的SQL语句分类和常见约束关键字。SQL语句分为DDL、DML和DQL三种类型,其中DDL语句用于定义、删除和修改数据表,关键字包括create、drop和alter。常见约束关键字包括if not exists、if exists、primary key、autoincrement、not null和default。此外,还介绍了常见的数据库数据类型,包括integer、text和real。 ... [详细]
  • 本文介绍了在处理不规则数据时如何使用Python自动提取文本中的时间日期,包括使用dateutil.parser模块统一日期字符串格式和使用datefinder模块提取日期。同时,还介绍了一段使用正则表达式的代码,可以支持中文日期和一些特殊的时间识别,例如'2012年12月12日'、'3小时前'、'在2012/12/13哈哈'等。 ... [详细]
  • 本文介绍了在iOS开发中使用UITextField实现字符限制的方法,包括利用代理方法和使用BNTextField-Limit库的实现策略。通过这些方法,开发者可以方便地限制UITextField的字符个数和输入规则。 ... [详细]
  • Activiti7流程定义开发笔记
    本文介绍了Activiti7流程定义的开发笔记,包括流程定义的概念、使用activiti-explorer和activiti-eclipse-designer进行建模的方式,以及生成流程图的方法。还介绍了流程定义部署的概念和步骤,包括将bpmn和png文件添加部署到activiti数据库中的方法,以及使用ZIP包进行部署的方式。同时还提到了activiti.cfg.xml文件的作用。 ... [详细]
  • 本文介绍了解决java开源项目apache commons email简单使用报错的方法,包括使用正确的JAR包和正确的代码配置,以及相关参数的设置。详细介绍了如何使用apache commons email发送邮件。 ... [详细]
  • Tkinter Frame容器grid布局并使用Scrollbar滚动原理
    本文介绍了如何使用Tkinter实现Frame容器的grid布局,并通过Scrollbar实现滚动效果。通过将Canvas作为父容器,使用滚动Canvas来滚动Frame,实现了在Frame中添加多个按钮,并通过Scrollbar进行滚动。同时,还介绍了更新Frame大小和绑定滚动按钮的方法,以及配置Scrollbar的相关参数。 ... [详细]
  • 使用Flutternewintegration_test进行示例集成测试?回答首先在dev下的p ... [详细]
  • 涉及的知识点-ViewGroup的测量与布局-View的测量与布局-滑动冲突的处理-VelocityTracker滑动速率跟踪-Scroller实现弹性滑动-屏幕宽高的获取等实现步 ... [详细]
  • 我收到这个错误.我怎么能在我的情况下解决这个问题?Bitmapcannotberesolvedtoatype发生错误的行publicvoidonPageStart ... [详细]
  • ***Createdbyjiachenpanon161118.**合法uri*exportfunctionvalidateURL(textval){consturlregex^( ... [详细]
  • oracle安装时找不到启动,Oracle没有开机自启是怎么回事?这一步骤很重要
    重启Oracle数据库重启Oracle数据库包括启动Oracle数据库服务进程和启动Oracle数据库两步,大家继续往下看。按照《【Oracle】什么?作为DBA&# ... [详细]
author-avatar
31號_K
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有