jaridmargolin / formatter.js

Format html inputs to match a specified pattern
http://firstopinion.github.io/formatter.js
2.48k stars 235 forks source link

Android Phones #34

Open TimBarton opened 10 years ago

TimBarton commented 10 years ago

Thanks for your work.

On Android devices were you have a phone number pattern ,the number is typed out of order. When you hit a number it goes in front of the previous number.

I am using this pattern:

'pattern': '({{999}}) {{999}}-{{9999}}'

If I use this pattern:

'pattern': '{{9999999999}}'

It works.

Android Version: 2.2.2 Android Version: 4.0.3

jaridmargolin commented 10 years ago

Are you using <input type="number>" ? This could possibly be a duplicate of #29.

TimBarton commented 10 years ago

I was using type="tel". I only see the problem on Android Phones. with 'pattern': '({{999}}) {{999}}-{{9999}}'. This works fine 'pattern': '{{9999999999}}'.

jaridmargolin commented 10 years ago

I have set up a jsFiddle: http://jsfiddle.net/5HuAZ/1/. Do you mind confirming that this example does not work correctly on android? Appreciate your feedback!

TimBarton commented 10 years ago

I tested on my Android phone and can confirm the issues can be replicated. Here is a video of the issue. http://kingdomware3.brinkster.net/movie.mp4

athorell commented 9 years ago

We found a problem smilar to this one on Android 2.3. We also have an input field with type="tel" (although that doesn't seem to matter) and use "pattern": "{{99}} {{99}} {{99}}". When I try to enter "660377" the numbers come out like "66 37 70". Might it be the same problem?