Add caret functionality to TextField