<pre> is not inserted correctly

VERIFIED FIXED

Status

()

Core
Editor
P3
normal
VERIFIED FIXED
18 years ago
17 years ago

People

(Reporter: Koike Kazuhiko, Assigned: Joe Francis)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

18 years ago
<p>Line 1</p>
<p>Line 2</p>

When I select "Line 2" and insert <pre>, I get the following result:

<pre>Line 2<pre>
<p>Line 1</p>

Comment 1

18 years ago
how are you inserting <pre>?  From the format menu or paragraph dropdown list or 
insert source dialog?

Comment 2

18 years ago
I got it to reproduce, this is what I did:
1. selected new composer window
2. entered 2 lines of text:
   here is some text
   here is more text
3. highlighted the 1st line of text, selected Format|Paragraph|Paragraph
4. highlighted the 2nd line of text, selected Format|Paragraph|Paragraph
5. selected "save" -- entered title and file name
6. selected View|Page Source -- both lines were wrapped in < P > tags
7. highlighted the 2nd line of text, selected Format|Paragraph|Preformat

- the 1st line of text became highlighted (which was weird)

8. selected save
9. selected View|Page Source

- the 1st line of text had been changed to < PRE > and the 2nd line of text 
ramained as a < P >
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 3

18 years ago
I forgot to mention that I did not try using the toolbar -- the toolbar is a bit 
messed up today. Assigning to akkana for review -- reassign as appropriate
Assignee: beppe → akkana

Comment 4

18 years ago
Format->Paragraph->Paragraph is acting on the wrong part of the document, not on
the selection.

I'm having trouble seeing where this menu actually calls in the JS or editor
code ... I'm guessing Charley at least knows which routine is being called, and
might be able to triage it better.
Assignee: akkana → cmanske

Comment 5

18 years ago
The command path is difficult to follow with Simon's new command architecture!
But we end up in nsHTMLEditor::SetParagraphFormat() like we do with any of the
paragraph formats set via toolbar dropdown or menu. So it flows into Joe's code
from there. Sorry Joe!
Assignee: cmanske → jfrancis
(Assignee)

Comment 6

18 years ago
fixed
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 7

18 years ago
Verified fixed in my Win32 10/27/00 Netscape_20000922_BRANCH.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.