If your cursor position keeps on losing it's place
Thanks for the response. But this condition will not work 100% when we have a number with decimal.
Lets say we get a formatted number 1,234.23. The cursor is set to last position.
When when you want to type something in between then this logic will fail as the cursor will keep going to last position again and again.
You didn't post any example code, so I have nothing to play with.
Have you tried just using
//comment out the other line
does that work?