androidjqueryjquery-pluginsmaskedtextbox

masked input not working in android mobiles?


I am using the digitalbush masked input jQuery plugin. It is working fine in web browsers and the iPhone browser perfectly, but it is not working for Android mobile devices.

My issue : mask is in input field _ - _ - ___.

When I type numbers it will 12345685555___--

Example: http://rossbender.com/temp/mask.html

Any suggestions? How can I solve this?

Thanks Prasad.


Solution

  • I resolved this issue with three actions, which have fixed this for all Android 4.0+ phones:

    1. Update masked-input to at least version 1.4
    2. Add type="tel" to the input, to trigger the numeric keyboard
    3. Remove the input's maxlength attribute or set it to a value certain not to interfere with the caret action, like 20.