We have a multiline textarea in Internet Explorer.
If we check it's content after the next then everything is correct (there are no extra carriage returns in textarea):
document.getElementById( 'text-area' ).value = "Hello,\nWorld!";
But if we set caret to the beginning position of the second line (in Internet Explorer, not in the code) and press tab key there is an extra carriage character (there is a string dump on keydown below):
value[0]='H'
value[1]='e'
value[2]='l'
value[3]='l'
value[4]='o'
value[5]=','
value[6]='\r'
value[7]='\n'
value[8]='W'
value[9]='o'
value[10]='r'
value[11]='l'
value[12]='d'
value[13]='!'
It's a problem because other browsers don't insert extra carriage return.
Do you know how to prevent this in Internet Explorer? With help of CSS or Javascript.