Closed
Bug 169033
Opened 23 years ago
Closed 23 years ago
Additional content removed when deleting a <LI>
Categories
(Core :: DOM: Editor, defect)
Tracking
()
VERIFIED
FIXED
M1
People
(Reporter: kmcclusk, Assigned: mozeditor)
Details
(Whiteboard: EDITORBASE+; fixinhand; need r=,sr=)
Attachments
(2 files)
|
480 bytes,
patch
|
Details | Diff | Splinter Review | |
|
4.20 KB,
patch
|
kinmoz
:
superreview+
|
Details | Diff | Splinter Review |
Using 2002091608 trunk build on WINNT.
1. Load the attachment into composer
2. Click at the end of the text "line4"
3. Keep hitting the backspace key to delete each character of line4.
4. Continue hitting the backspace key.
After the <LI> for line4 is removed other content above line4 is also removed
| Reporter | ||
Comment 1•23 years ago
|
||
| Assignee | ||
Comment 2•23 years ago
|
||
I am unable to reproduce the bug described, though I do see another proble: the
various UL nodes are not deleted as you backspace through them, which has no
visible ramifications but which is still incorrect.
I'm seeing this too when I edit status reports. Plussing.
| Assignee | ||
Comment 4•23 years ago
|
||
Two part fix:
1) CheckForEmptyBlock() now continues looking up from the current selection for
as long as we are in (nested) empty blocks. Thus when you delete the last <li>
in a <ol>, the <ol> is also deleted, etc.
2) The code in CheckForEmptyBlock() that detected deletion of the first <li>
and gave us a br (to create an empty line) has been modified to only do this if
the <li> was not a sublist. In other words, only if there is aplace to create
a <br> that is _outside_ of a list.
| Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Whiteboard: EDITORBASE+ → EDITORBASE+; fixinhand; need r=,sr=
Target Milestone: --- → M1
Comment on attachment 101501 [details] [diff] [review]
patch to nsHTMLEditRules.cpp
Is there code that gets executed after CheckForEmptyBlock() that will prevent
the caret from ending up in the list body itself? The cases I'm thinking of are
something like:
body text
o Outer list
o |
o Inner List Item 2
o Inner List Item 3
or:
body text
o Outer list
o Inner List Item 1
o |
o Inner List Item 3
| Assignee | ||
Comment 6•23 years ago
|
||
There is no such code but I am aware of the issue. There are other ways this
could happen (such as pasting in an entire <li>) so I want to have the selection
adjustment for this happen at AfterEdit() time. There is already an open bug on
this (#152304) and I am working on it now.
Comment on attachment 101501 [details] [diff] [review]
patch to nsHTMLEditRules.cpp
sr=kin@netscape.com
Attachment #101501 -
Flags: superreview+
| Assignee | ||
Comment 8•23 years ago
|
||
fixed on trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•