I hope this hasn't been discussed before. I searched but couldn't find a thread for this.
This setup behaves in two possible ways, one is good and one is bad:
Good: If the user clicks inside the text box, but after the default text, the text gets cleared and the cursor shows up at the beginning of the text box.
Bad: If the user clicks inside the text box, but directly on the default text, the text gets cleared, but the cursor is not displayed and the text box does not have the focus. In order to start typing, the user must click on the text box again.
So my question is: If the cursor is inside a string of text which gets cleared, is there a way to reinstate the cursor and the text box focus?
Here is simplified version of code involved: