Internet Explorer has a multi-line text area.
If we check its contents after the following, then everything will be correct (there are no additional carriage returns in textarea):
document.getElementById( 'text-area' ).value = "Hello,\nWorld!";
But if we move the initial position of the second line (in Internet Explorer, and not into the code) and press the Tab key, an additional caret character will appear (there is a line dump when opening the key 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]='!'
This is a problem because other browsers do not insert extra carriage returns.
Do you know how to prevent this in Internet Explorer? Using CSS or Javascript.
, , , . , IE , <textarea>, "\ r\n" , , , , , Firefox "\n", — , "\ r" .
<textarea>
- jQuery , "\ r" , , , . , (, Stackoverflow), , "\n" . , "\ r" , , , , .
, .
, . \n, \r\n, , \r.
\n
\r\n
\r
HTTP \r\n , , (- ) \r\n. , \r\n. .
, , :
. :
jQuery: TAB