miladd3/automatic-direction

Numbers and punctuation

SBenoit5 opened this issue · 3 comments

Sorry for my newbie question, but is there a way that the numeric and punctuation characters be considered as Latin? Because I'm trying to use your script in a form, and when I write a mailing address in Latin, your code considers the numbers to be Arabic and puts the number at the end of the line.
Thanks for your help.

Hi
if the numbers are latin numbers it should be considered as latin.
but if you want arabic numbers to be considered as latin characters. you should edit the main code and add Regex that do this trick.

Ok, you're right… the issue is not with your code. It comes from somewhere else. I was trying to use your code in this situation : In a RTL webpage, I have a RTL contact form, but in some countries they use both type of characters (RTL and/or LTR). So I thought that your code might be the solution… Depending on what type of text they write (latin or arabic), the direction of the field's content is determined. But it seems that it's not that simple, because the browser, or the contact form plugin reinterprets the code after yours and shift the numbers to the right of the line (even if it's a latin number). Do you think there's a workaround for this? Thanks again.

hi again :D
so i think some script is interrupting the input
i recommend testing this in a raw input.
sry but i cant fix the problems on other libraries