3 ms·
Often. Why would you type endlessly long lines in a browser text area without inserting the occasion new-line to aid readability in that text area? I've seen
by ColinWright 12y ago
Often. Why would you type endlessly long lines in
a browser text area without inserting the occasion
new-line to aid readability in that text area?
I've seen people do this. I start to get anxious,
wondering when they will ever hit the return key,
wondering why they don't. I simply don't understand
why people do that.
Why don't you? You don't expect CR/LF in HTML to
render in the browser, and you format the HTML to
read more easily, don't you?
- krapp 12y agoAdmittedly, because i'm lazy and don't think about formatting posts unless i'm posting code, which is a bad habit. But still, every time I do hit enter in this textbox, it should create a newline in the formatted post. [edit - I added a newline between those two sentences, it's rendered as a single line.]
- ColinWright 12y ago> ... every time I do hit enter in this > textbox, it should create a newline ... ^^^^^^^^^ This is your expectation. It is not my expectation. I do not believe that every time one hits enter in the text box it should create a newline in the formatted post. Why is your intuition more valid than mine?
- krapp 12y agoI'm not going to claim it's more valid, but I do believe it more closely follows the principle of least astonishment. If I go through the trouble of posting three lines, but only one line appears, then the result doesn't match what I intended to convey - it is as if I posted an entirely run-on paragraph either way. Granted, there are obvious paragraphs when you break two lines - but why that and nothing at all for one?
- ColinWright 12y ago> ... I do believe it more closely > follows the principle of least > astonishment. I would be more surprised to find that something I type in a textarea has its line-feeds preserved as it gets converted from the text I type into HTML. > If I go through the trouble of posting > three lines, but only one line appears, > then the result doesn't match what I > intended to convey - it is as if I > posted an entirely run-on paragraph > either way. Which is what happens when HTML is rendered to a screen. The line-feeds in the HTML are not preserved. We have different expectations. The existing behavior matches my expectations, and it does not match yours. I have found you an explanation, but I expect you will never agree with me about what's "natural" because we have different beliefs about what "should" happen. <fx: shrug /> It is what it is, and it won't change. You will disagree with the rationale and "naturalness," but perhaps the fact that others exist with different expectations may help you accept that it does not and will not do what you thought was obviously "right." I'm not, by the way, claiming that its behavior is more "right" than what you expect. I'm merely pointing out that not everyone has the same expectations as yours.
- krapp 12y agoIt does seem obvious to me, but i'm aware it's subjective. Between the two, I suppose paragraphs are more explicit.
- raquo 12y ago> endlessly long lines in a browser text area I don't understand. Text wraps automatically inside a textarea without any newlines, and HN textarea is not endlessly long, it's 485px wide which pretty much matches your manual newline splitting.
- ColinWright 12y ago>> endlessly long lines in a browser text area > I don't understand. Text wraps automatically > inside a textarea without any newlines, ... That depends. Once upon a time not all browsers had the feature of auto-wrapping text in a TEXTAREA element, and many people grew up with the habit of putting line-feeds into their text as a matter of course. It made the text readable as it was typed, and avoided the problems caused by some browsers deliberately inserting CR or LF into long text lines. For many, the habit persists, and for me (for example) it would be extremely annoying to have CR or LF from the text preserved as it gets converted into HTML.
- raquo 12y ago> Once upon a time not all browsers had the feature of auto-wrapping text in a TEXTAREA element Ha. That explains it. I wasn't on the internet when this was going on.