autoNumeric / autoNumeric

AutoNumeric is a standalone library that provides live as-you-type formatting for international numbers and currencies.
https://autonumeric.org
MIT License
1.77k stars 419 forks source link

AutoNumber doesn't allow persian or arabic number in input box via android #668

Open sonsy-soft opened 4 years ago

sonsy-soft commented 4 years ago

when in android i want to insert a persian digit in input box that initialized by autoNumber, it rejected the key and prevent to change the value in the input box.

how can i fix it in my code ?

AlexandreBonneau commented 4 years ago

Do you have to compose the numbers, or can you input it directly?

sonsy-soft commented 4 years ago

yes some library like pesianjs convert persian or araic digit to english we can use it https://github.com/usablica/persian.js

AlexandreBonneau commented 4 years ago

I'm not sure to follow. Are you using persian.js in combination with AutoNumeric ? Could you please describle precisely what you are doing to reproduce the bug ? Would you have a screencast if you feel reproducing it will be hard for non-arabic/persian speakers ?

For instance, when you enter ۳۴۵ in the autoNumeric field, do you get 345? For instance, when you enter ٣٤٥ in the autoNumeric field, do you get 345?

sonsy-soft commented 4 years ago

dear Alexandre I don't get the 345 , because autoNumber reject the arabic/persian number on keypress. this problem was appeared in smartphone.

AlexandreBonneau commented 4 years ago

Which browser are you using under Android? Do you see any errors in the console when trying to enter arabic numbers in the AutoNumeric element?

sonsy-soft commented 4 years ago

i'm using chrome i use imputmask with my input form that it dosent have the error

JeroenKocyigit commented 3 years ago

Hi @AlexandreBonneau, I am currently experiencing a similar issue, however only on iOS, I don't use any external library.

When you're using an Arabic keyboard, you're unable to enter any values. I looked trough the source code and I believe either the keydown or keyup event is blocking it the input because the string key cant be converted to a number.

If you need more info let me know, its a requirement for my pwa to enter Eastern Arabic numbers. So I will gladly help in order to figure this out.

IMG_E0003