Fix a bug with the text cursor in text boxes.