Phonegap input type password field focus

Here is an easier solution!

Change
<input type="password" />

to

<input type="text" class="password-field" />

In your CSS style sheet(s).

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

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!

Leave a Comment