I've been using an edit control built on top of a textarea for a recent project and I noticed that upon clicking on the control to get focus, the caret cursor would not land in the top let corner of the control, instead it would have a few characters of left padding.
That's because my Komodo Edit IDE was formatting the code by putting the end tag on a different line and would add sufficient white space for a balanced indentation. That was causing the padding to appear.
The workaround is to keep the textarea element with a truly empty value like this:
<textarea></textarea>
No comments:
Post a Comment