changed text imput so that it changes the cursor position of text field