Open laurglia opened 4 years ago
Any updates on this yet?
I am experiencing the same issue, cursor jumping around unexpectedly after typing a few characters, regardless of the format
prop being true or false
Experiencing the same issue, any update on this?
Expected Behavior
When entering an Estonian 8-character phone number, the prop
format
is set to true and writing the country code in the beginning, you should be able to enter the number so that all numbers are in the right order.Current Behavior
When entering an Estonian (+372 country code) phone number that is 8 characters long, then after entering the 7th character, the cursor moves and the last character will be in the wrong location.
Video: https://gfycat.com/plaintiveimaginativeiberianemeraldlizard
As you can see, when strictly using keyboard to type +37253078448, then the actual result is +37253087844. This seems to happen with all valid 8-character Estonian phone numbers, another example: +37251234567.
Steps to Reproduce
format
prop totrue
.Environment
Details
From looking at code, it seems that the issue is with the
getCursorPositionAfterFormating
method.I created the following test code which actually returns 4, instead of 7.