I am working on a small function where you can enter HTML tags with text between them onclick. My problem is the code below doesn't quite work in IE8.
var textArea = $('.area').get(0);
var len = textArea.value.length;
textArea.selectionStart = len;
textArea.selectionEnd = len;
textArea.focus();
IE8 doesn't seem to take the length of the text into consideration and instead of positioning the cursor after the closing tag, it positions itself in front of the opening tag. So, for instance, if you enter: < b >SOME TEXT HERE< / b > onclick the cursor will jump back to the front.
Feel free to ask for any additional info.