On my site designed for mobile devices I have an input field that is used for PIN numbers. I want the text to be hidden as it is entered and I want the number pad to pop up
The straightforward ways like using "pattern" and "inputmode" not working in Android nor IOS, so I emplemented the below workaround using CSS, and JavaScript.
https://jsfiddle.net/tarikelmallah/1ou62xub/
HTML
JavaScript
$().ready(function(){
var xTriggered = 0;
$( "#passReal" ).keyup(function( event ) {
$('#pass').val($('#passReal').val());
console.log( event );
});
$( "#pass" ).focus(function() {
$('#passReal').focus();
});
});
Style:
input#passReal{
width:1px;
height:10px;
}
input#pass {
position: absolute;
left:0px;
}
this image from Android emulator: