Seems to be a WebKit bug (consider filing it) related to treating CR/LF pair as two characters instead of one. Since it's usually noncritical if, say, 197 characters are allowed instead of 200, it's fine to ignore this.
But if you want, you can try to continuously save caret position, replace all
to
, and restore caret position in textarea while user is typing.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…