libphonenumber js does not save the cursor position

51 Views Asked by At

libphonenumber js does not save the cursor position. Every time I enter or delete a character with the input event, I overwrite value. I understand that because of this, the cursor is placed at the end of the number. But how can you do it right? I have not found on the Internet that other programmers have problems with this. What am I doing wrong? Example of entering a number

I tried to track cursor changes, but there can be hundreds of number formats, it's hell

0

There are 0 best solutions below