Pressing enter causes caret to jump from end of <p> to the<h1>

VERIFIED FIXED in mozilla0.9.9

Status

()

VERIFIED FIXED
17 years ago
5 years ago

People

(Reporter: TucsonTester1, Assigned: mozeditor)

Tracking

Trunk
mozilla0.9.9
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: EDITORBASE+; fixinhand; reviewed)

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
build: 2002011703
platform: Windows XP
ability to reproduce: always

Steps to reproduce:

1. open a blank composer document
2. choose "paragraph" from the format drop-down list and type in some text
("paragraph").
3. hit enter
4. choose "heading 1" from the format drop-down list and type in some text
("heading 1").
5. move cursor back to the end of the "paragraph" text.
6. hit enter once.

results: cursor moves to the beginning of the "heading 1" line
expected results: it would put a blank line in between the "paragraph" and the
"heading 1"

more results:

1. after noticing that cursor moves to "heading 1" line, then move cursor back
to the end of the "paragraph" line.
2. press enter several times repeatedly.

Notice how the composer finally inserts a line, but then deletes it and the
process goes back and forth as you press the enter key repeatedly.  It's very
bizarre.

Comment 1

17 years ago
Confirming on 2002011503 Win2k.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

17 years ago
Could you please clarify step 5: is this done by clicking at the end of the line
or by pressing an arrow key or ?

Sounds like a Core bug...
nominate for EDITORBASE consideration
Assignee: syd → jfrancis
Component: Editor: Composer → Editor: Core
Summary: Pressing enter causes cursor to jump from the end of the paragraph format to the heading 1 format → Pressing enter causes caret to jump from end of <p> to the<h1>
Whiteboard: EDITORBASE
(Reporter)

Comment 3

17 years ago
The way I did it originally (step 5) was by clicking at the end of "paragraph"
with the mouse pointer.  I did try it the other way by using the "up" arrow key
to move it back to the previous line and I still got the same results.
Marking EDITORBASE+.
Whiteboard: EDITORBASE → EDITORBASE+
(Assignee)

Updated

17 years ago
Status: NEW → ASSIGNED
Whiteboard: EDITORBASE+ → EDITORBASE+; fixinhand; need r=,sr=
(Assignee)

Comment 5

17 years ago
Created attachment 67683 [details] [diff] [review]
Diffs of nsHTMLEditRules.cpp

I have a ton of patches to this file.  I hand editted the diff here to be just
the relavant ones for this bug, but the line numbers may not match up.	

However the diff is simple: I'm just changing some IsBreak() calls to
IsVisBreak() instead.  This bug is caused by non-visible breaks fooling the
editor code into splitting the <p> when instead it should insert a <br>.
(Assignee)

Comment 6

17 years ago
099
Target Milestone: --- → mozilla0.9.9

Updated

17 years ago
Keywords: nsbeta1+
Comment on attachment 67683 [details] [diff] [review]
Diffs of nsHTMLEditRules.cpp

r=glazman
Attachment #67683 - Flags: review+

Comment 8

17 years ago
Comment on attachment 67683 [details] [diff] [review]
Diffs of nsHTMLEditRules.cpp

sr=kin@netscape.com
Attachment #67683 - Flags: superreview+

Updated

17 years ago
Whiteboard: EDITORBASE+; fixinhand; need r=,sr= → EDITORBASE+; fixinhand; reviewed
(Assignee)

Comment 9

17 years ago
fix landed on trunk
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 10

17 years ago
Looks good on build 2002021108.

Marking Verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.