Closed Bug 228347 Opened 21 years ago Closed 18 years ago

See two paragraphs in msg compose, get only one (run together, newline lost)

Categories

(Core :: DOM: Editor, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 125928

People

(Reporter: brendan, Assigned: mozeditor)

Details

Attachments

(1 file)

I'm editing a message in mail compose of the form

blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah

blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah

I believe I've moved the second paragraph after the first; possibly I've deletd
the 2nd newline separating both paragraphs, then re-inserted it.  All looks good
and I send.  To my dismay, the sent message (in text/plain) has only one newline
between the two paragraphs, making them one paragraph.

/be
Aha, I recall now better what happened: there were three newlines (apparently --
not sure how the two paragraphs got separated, but it looked like two empty
lines lay between the paragraphs).  I deleted one newline using backspace after
putting the cursor at the start of the second paragraph.  It appeared there were
now two newlines between the last non-space char of the first paragraph and the
first char of the second.  Upon sending, there was only one.

/be
Plaintext or html compose?  (I wish we had some way to make bugzilla ask this ...)

If plaintext, Joe, could this be a problem of something like \n<br>\n turning
into a sequence where the editor is ignoring one of the newlines thinking it's
just formatting whitespace?

Brendan, if you could come up with simple repro instructions it might help in
finding out what's going on and what combination of br and \n we have (if that's
actually the problem).
plain text compose, I'm sure.  I didn't do any formatting, and it was to people
not in my abook.

I don't know how the paragraphs got separated by two blank lines (mitchell was
editing while I was elsewhere), but I'm pretty sure I deleted by backspacing
from the front of the 2nd paragraph.  Does that fit the \n<br>\n scenario?

/be
> plain text compose, I'm sure.  I didn't do any formatting, and it was to people
> not in my abook.

That says that the message would have been sent as plaintext, but it doesn't
establish whether you're using plaintext mail compose.

Under Mail/News Account Settings, Server Settings/Composition and Addressing, is
"Composer Messages in HTML format" checked?  Or, alternately, when you're
composing messages do you see an html formatting toolbar?

I hope Joe can comment on the other question.  I have noticed, though, that I
seem to see more spurious blank lines in textareas (caret appears one line lower
than it ought to be, hit backspace once and both the apparent blank line and the
 br before it go away) than I did in earlier versions.  I'll file a separate
editor bug on that if I get a reproducible case.  Joe, has anything changed
recently that might affect newline/br handling in plaintext?  (Ugh, it also
might have been something that changed in layout.)  If Brendan had one of these
spurious newlines and thought he had inter-paragraph spacing that wasn't really
there, that would explain what he saw.
Akkana, thanks for the patient querying.  I do have "Compose messages in HTML
format" checked under "Mail & Newsgroup Account Settings... / Composition &
Addressing."

If I did not have that box checked, would I still have a choice when sending of
using plaintext, html, or multipart/alternative?  If I did not have that box
checked (i.e., I was using plaintext composition), what conditions would cause
the message to be sent using html, if any?

/be
> If I did not have that box checked, would I still have a choice when sending

No.  If you compose in plaintext, you'll only be able to send plaintext.  Stick
to html compose if you ever want to send html (and you can always use
shift-click on Compose or Reply if you want a one-time plaintext compose window).
Like Brendan, I too have seen this bug for quite a while now on win98se.
Currently, I am using the 20031217 build, but I have seen this for several weeks
actually.

Change OS to all?

The real news, however, is that while playing tonight with the format=flowed
preferences, I noticed something that I hope might help:  I composed and sent a
message (using both the HTML and plain text option) with format=flowed enabled.
 When I looked at the message in the Sent folder, each paragraph lost the new
line separation.  Out of curiosity, I used about:config to turn off
format=flowed and then re-examined the same message.  To my astonishment, the
new line separation appeared!  I tried this switch a couple of times, and it is
perfectly reproducible each time.

Could this bug be another manifestation of format=flowed problems?

I would be happy to share that email if anyone wants it.
Cc'ing the wizard of flowed.

But we still don't have instructions on how to reproduce this.  Dan, it sounds
like you can make this happen -- can you explain how?
Try as I might, I just couldn't reproduce that problem "on the fly" again after
a dozen attempts of sending myself emails with different settings.  Yet that
message I mentioned in comment 7 was still behaving badly when switching the f=f
display on and off.  

So I tried an experiment: I copied the source code of that message and saved it
in my profile's mail folder under a different name (f=fweirdness).  After
restarting Moz, the new folder was in my list, with the one badly behaved
message that still consistently seems to drop newline separations between
paragraphs, only to reappear again when f=f preferences are turned off.

I have sanitized the email to remove any identifying information, and I will
attach it here for you to try on your systems.  This sanitized email
consistently displays the "lost newline separation" problem when you turn f=f on
and off using the about:config preferences.  (You may have to click away from
the message and then return to the message after you change f=f preferences so
that Moz has the chance to refresh the message display.)

I have the Mozilla suite, 20031217, on win98se.
Close Moz, save this as a folder in your profile's mail/news account, restart
Moz, view this email while changing f=f preferences with about:config.

Notice the newline paragraph separators disappearing and reappearing!
Assuming Brendan Eich's resulting mail looked similar to Dan Kies's -- with paragraphs ending with a trailing space character -- and assuming that Dan, like Brendan, was originally composing as HTML: Dupe.

A known problem that has many, many dupes and has been sufficiently diagnosed since before this bug was opened (bug 125928 comment 21), but unfixed because it's in a part of the code that isn't easy to change nor obviously visible once fixed.  733t hax0rs don't get cred for fixing the infrastructure.

*** This bug has been marked as a duplicate of 125928 ***
Status: NEW → RESOLVED
Closed: 18 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: