iOS - element.clear() does not clear everything intermittently. How do I move the cursor?

I am trying to clear the text inside a textfield completely. Because it happens so fast, the cursor moves faster than the deletion and it leaves a couple of characters after clear() is done. The cursor is left in the middle of the two characters.

After performing clear(), I’d like to move the cursor back to the right most so that I can try the clear() command again. How do I move the cursor?

1 Like