I have a behavior attached to an entry which adds a separator character after every x digits. It works well, for the most part. But if I try to go to the middle of the entry and type, every time I type a digit, the cursor jumps to the end. The digit is added in the correct place and my separators are kept in the correct locations, but the cursor is moved to the end of the entry instead of where it should be, right after the last digit that was typed. Is there a way I can prevent this from happening (and keep the cursor where it is supposed to be) when my behavior changes the text contained in the entry?
↧