Closed Bug 307112 Opened 19 years ago Closed 19 years ago

Whitespace (newline) disappears when sending a reply

Categories

(Thunderbird :: Message Compose Window, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 314213
Thunderbird2.0

People

(Reporter: jefdriesen, Assigned: mscott)

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b4) Gecko/20050904 Thunderbird/1.4 ID:2005090406 Create a very simple message which contains only the text below and send it to yourself (in the plaintext format): Some text on line 1 Some text on line 2 Some text on line 3 Some text on line 4 Now create a reply to this message and add some text halfway the original message (e.g. between line 2 and 3, which does split the quote in two parts). The body of the reply will look like this: (save to drafts folder and look at the message source) <body> Jef Driesen wrote: <blockquote cite="..." type="cite"> Some text on line 1 <br> Some text on line 2 <br> </blockquote> This is the first part of the reply<br> <blockquote cite="..." type="cite"> Some text on line 3 <br> Some text on line 4 <br> </blockquote> This is the second part of the reply<br> </body> In the composer window, the quoted text and the replies are nicely separated by some whitespace (to increase readability). So far so good. Now send this new message to yourself again (also in plaintext format). Check the message (in your send folder) and you will see all the whitespace is gone: Jef Driesen wrote: > Some text on line 1 > Some text on line 2 This is the first part of the reply > Some text on line 3 > Some text on line 4 This is the second part of the reply This kind of message, without any withespace, is very difficult to read. With Thunderbird 1.0.6, there are real empty lines inserted like below: Jef Driesen wrote: > Some text on line 1 > Some text on line 2 This is the first part of the reply > Some text on line 3 > Some text on line 4 This is the second part of the reply This behaviour is certainly breaking the WYSIWYG concept in my opinion and should be fixed. And I'm not the only one seeing this behaviour. Take a look at the discussions here: http://forums.mozillazine.org/viewtopic.php?t=279526 http://forums.mozillazine.org/viewtopic.php?t=297219 http://groups.google.be/group/netscape.public.mozilla.mail-news/browse_frm/thread/4281ba6d7bc667b5/ Reproducible: Always Steps to Reproduce: I tested with a new profile and no extensions installed.
Those <br> tags that appear in the HTML message source aren't putting a "blank line" in their position; they're simply forcing the HTML to break. The whitespace between the quoted and unquoted parts of this text in the compose window is provided by CSS styling. Try adding this to your userContent.css file (in <yourprofile>\chrome -- create the file if it doesn't exist): .moz-text-flowed blockquote { /* provide a little spacing between quoted and unquoted text for text/plain;format=flowed message display */ margin-top: 1em !important; margin-bottom: 1ex !important; } That's not a perfect solution, since if there are any blank lines between the quoted and unquoted text, the margin will make the space between the sections look wider than necessary. There has been a relatively recent change in this area -- see bug 144998. However, the previous behavior certainly wasn't WYSIWYG in any meaningful way, and clearly was broken. But I think that when you are explicitly converting HTML to plain, you lose any claim to WYSIWYG anyway.
I already found out that those <br> tags have no influence. You have a point about the conversion from HTML to plaintext. However, I think the plaintext version should at least resemble the html version as close as possible. Most of my recipients are using Outlook (Express) and cannot apply the userContent.css customization. To make the text easily readable I have to add all the whitespace manually (which is quite some work and easy to forget). But this extra added whitespace takes up a lot of (wasted) space in the composer window now. And when sending in html, there is no reason to add the extra whitespace because the message looks fine without. Imagine sending a message with both a plaintext and html part. Now always one of the two will look 'messed up'.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Sorry, changed the status of my bug by accident.
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Rather than change the CSS to pad out the messages you view, perhaps the better solution is to change the CSS to reduce the margin & padding in the messages you compose. Unfortunately, there's no simple way I know of to distinguish between the contents of the message compose window and those of the message display window (having the compose window use <body class="moz-html-compose"> would be a nice touch), but given the overly large margins, maybe it doesn't matter that much. Try this instead, in userContent.css: blockquote { padding-top: 2px !important; padding-bottom: 2px !important; margin-top: 0 !important; margin-bottom: 0 !important; } Then when you open the compose window, you'll have the tiniest bit of padding between the quote and the typed text -- too small to confuse that spacing for an actual newline in the text of the message. If you enter a newline to space it out, that newline gets included in the conversion to plain text.
Chase, isn't this what you were talking to me about in the office yesterday?
(In reply to comment #7) > Chase, isn't this what you were talking to me about in the office yesterday? Yes, from the initial description it sounds exactly like what I'd seen and talked to you about.
Confirmed using Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b5) Gecko/20050924 Thunderbird/1.4 ID:2005092407 Likely fallout from bug 144998 if you ask me.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
(In reply to comment #9) > Likely fallout from bug 144998 if you ask me. More like, it's a bug that's become visible now that 144998 has been fixed. Where there used to be an inconsistent number of blank lines between quoted and unquoted text, there are now exactly as many blank lines as the user types in. Seems like a step forward to me. I don't know how other people feel about it, but now that I've seen how the CSS from comment 6 works, I'm going to keep it in my profile. I've modified it slightly: ==== blockquote[type=cite] /* type=cite => quote within mail; xref bug 45268, bug 183219 */ { padding-top: 2px !important; padding-bottom: 2px !important; margin-top: 2px !important; margin-bottom: 0 !important; } blockquote > pre /* quoting a non-f=f plain-text message nests a <pre> within the quote */ { margin-top: 0 !important; margin-bottom: 0 !important; } ==== It might be a good thing to incorporate something like this into the default CSS for Thunderbird, as a fix for this bug. (See also bug 127787 comment 8 & 9.)
(In reply to comment #10) > It might be a good thing to incorporate something like this into the default CSS > for Thunderbird, as a fix for this bug. (See also bug 127787 comment 8 & 9.) This would be a solution for Thunderbird users only. But all other users (with OE or whatever) would still see those messages without any space. And i think it's important to produce messages which look good/readable in any client. Suppose you were an OE,... user. Would you consider switching to a mail client that is sending you all the time such 'difficult to read' messages? I don't think so. And I'm also very curious about how all Thunderbird 1.0.x users (where this bug is not present) are going to react when all their send plaintext messages will look worse after the upgrade. At least in my personal opinion, the current behaviour will damage Thunderbird popularity.
(In reply to comment #11) > (In reply to comment #10) > > It might be a good thing to incorporate something like this into the default > > CSS for Thunderbird, as a fix for this bug. > > This would be a solution for Thunderbird users only. But all other users (with > OE or whatever) would still see those messages without any space. No, you have misunderstood my comment. The latest CSS I suggested makes it so that *when you compose* there is no margin and minimal padding -- that way, you don't think that there are blank lines where there aren't. I said as much in comment 6. How about actually trying it out before reacting?
(In reply to comment #12) Yes, I tried the code from your comment. And I also understand what the CSS is doing. It removes those 'virtually' blank lines between the quote and the reply. Like you said, there are now exactly as many blank lines as the user types in. So far I agree with you. But even with your CSS code, I still have to add extra newlines *manually*. (The only difference for me, is that I'm not going to forget to do that now.) After the conversion to plain text, this manually added whitespace is preserved. So the result will look okay in every email client. But my point is that I think the whitespace should be added automatically. Or am I the only one who thinks there should be some separation between quotes and replies? What you are proposing is removing margin/padding from the html elements. But that margin/padding is there for a reason: to separate two pieces of text, even if there is no explicit newline between them. That's why you are not going to add an extra <br> tag between two paragraphs, because every browser I know, will use margins/padding for that. But in a plain text version, there is no such thing as margin/padding. The only way to separate two pieces of text now, is to add a newline. (In Thunderbird we could also use CSS for displaying here, but that's not true for other email clients. And I prefer not to send messages which are difficult to read, no matter what email client is used at the other side.) And what in the case a message is send as both html and plaintext? Should i add extra whitespace (now there is too many whitespace in html) or not (now there is not enough whitespace in the plaintext)? I hope I made myself more clear now. Thanks for your time anyway.
putting in the 2.0 bucket for discussion.
Target Milestone: --- → Thunderbird2.0
CSS on the viewer is no solution, because the msg source is already messed up, local CSS rules won't help my recipients, which are my problem. I filed a fresh bug about this, with more cases considered. *** This bug has been marked as a duplicate of 314213 ***
Status: NEW → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: