You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I have a problem that when I want to insert a digit between other digits, the caret jumps to the end of text. Actually when value has a character like comma, then the caret will jump to the end, if we set the value by script.
For example we have digits 465 and if we want to insert digit 9 between 4 and 6, caret will jump after 5, because the formatted value would be 4,965. I expected to see caret after last typed character (9) not the end of text.
Finally I found a fix for this issue and would like to explain that.
I Solved this issue by keeping remained length after current caret position in onKeyDown (key_check) event as lastRemainedLength,
and then update the position of caret in onKeyUp (price_it) event by new formatted value length minus lastRemainedLength.
Good luck
The text was updated successfully, but these errors were encountered:
Hi
Thanks for your great library.
But I have a problem that when I want to insert a digit between other digits, the caret jumps to the end of text. Actually when value has a character like comma, then the caret will jump to the end, if we set the value by script.
For example we have digits 465 and if we want to insert digit 9 between 4 and 6, caret will jump after 5, because the formatted value would be 4,965. I expected to see caret after last typed character (9) not the end of text.
Finally I found a fix for this issue and would like to explain that.
I Solved this issue by keeping remained length after current caret position in onKeyDown (key_check) event as lastRemainedLength,
and then update the position of caret in onKeyUp (price_it) event by new formatted value length minus lastRemainedLength.
Good luck
The text was updated successfully, but these errors were encountered: