Cursor no longer jumps when input string is replaced