Closed
Bug 187662
Opened 22 years ago
Closed 22 years ago
unable to insert <br> in an empty document at the first time
Categories
(Core :: DOM: Editor, defect)
Core
DOM: Editor
Tracking
()
VERIFIED
FIXED
M1
People
(Reporter: yuanyi21, Assigned: mozeditor)
Details
(Keywords: regression, topembed, Whiteboard: EDITORBASE+, fixinhand)
Attachments
(1 file)
1.45 KB,
patch
|
Brade
:
review+
kinmoz
:
superreview+
|
Details | Diff | Splinter Review |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030103 steps: 1. open composer; 2. press <Enter>. result: nothing happen. press <Enter> again will insert <br> correctly.
I think the changes for bug 174017 may have caused this regression. When I hit return, the bogus br node is removed, so we have a selection that is inside an empty body. The changes made for 174017 in |nsHTMLEditRules::StandardBreakImpl()| then cause both |bAfterBlock| and |bBeforeBlock| to be set to true so we never add the needed 2nd br. jfrancis, for both ws calls the node passed in is the body, and the returned visNode is also the body. Perhaps we need to special case for that situation?
Keywords: regression
Whiteboard: EDITORBASE
Assignee | ||
Comment 3•22 years ago
|
||
when inserting a break, check for an empty block after doing any deletion and bogus node removal. If block is empty populate it with a br before continueing on with break insertion code.
Assignee | ||
Updated•22 years ago
|
Attachment #110976 -
Flags: superreview?(kin)
Attachment #110976 -
Flags: review?(brade)
Assignee | ||
Updated•22 years ago
|
Whiteboard: EDITORBASE → EDITORBASE, fixinhand
Target Milestone: --- → M1
Comment 4•22 years ago
|
||
Comment on attachment 110976 [details] [diff] [review] patch to nsHTMLEditRules.cpp in this block in nsHTMLEditRules.cpp (around line 1515): + if (isEmpty) + { + nsCOMPtr<nsIDOMNode> brNode; + PRUint32 blockLen; + res = mHTMLEditor->GetLengthOfDOMNode(blockParent, blockLen); move the nsCOMPtr declaration down until after you call GetLengthOfDOMNode r=brade with that
Attachment #110976 -
Flags: review?(brade) → review+
Comment on attachment 110976 [details] [diff] [review] patch to nsHTMLEditRules.cpp sr=kin@netscape.com
Attachment #110976 -
Flags: superreview?(kin) → superreview+
Comment 6•22 years ago
|
||
EDITORBASE+, nsbeta1+
Keywords: nsbeta1+
Whiteboard: EDITORBASE, fixinhand → EDITORBASE+, fixinhand
Comment 7•22 years ago
|
||
Composer triage team: nominating for topembed (nsbeta1 is used for composer application defects).
Assignee | ||
Comment 8•22 years ago
|
||
This was checked in on tip a week ago.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•21 years ago
|
QA Contact: sujay → sairuh
Comment 9•21 years ago
|
||
vrfy'd fixed on all platforms with recent trunk bits.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•