Closed Bug 101690 Opened 25 years ago Closed 25 years ago

Delete key at end of line deletes a line then caret freezes

Categories

(Core :: DOM: Editor, defect, P3)

x86
Windows 2000
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.6

People

(Reporter: kazhik, Assigned: kinmoz)

References

Details

(Keywords: dataloss, Whiteboard: [EDITORBASE] [PDT-] fixed on trunk)

Attachments

(1 file, 1 obsolete file)

If you hit delete key at the end of a line, the line is deleted. After that any key isn't accepted. The caret freezes.
I'm not seeing this on Win2K build 2001092308 Reporter: what build are you using? You should always include this in every bug report. Please read the bug reporting guidelines, available at: http://www.mozilla.org/quality/bug-writing-guidelines.html In future, consider using the bugzilla helper to report bugs:http://www.mozilla.org/quality/help/bugzilla-helper.html Thanks for using bugzilla
My build is 2001092503/Win2k.
I still can't reproduce this with build 2001092503 on win2k Reporter: Could you give exact steps to reproduce? Thanks!
Summary: Delete key deletes a line → Delete key at end of line deletes a line then caret freezes
Steps to reproduce: (1) Open a mail compose window in plain text mode. (2) Hit Enter key at the top of the textarea. (3) Hit up-arrow key and type "abc" at the top of the textarea. (4) Hit Delete key at the end of "abc".
This may be a dup of 93088, which I have a fix for. At any rate, it should be my bug and not JF's.
Assignee: ducarroz → jfrancis
Component: Composition → Editor: Core
Product: MailNews → Browser
Target Milestone: --- → mozilla0.9.6
I can confirm the bug for Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012. So OS=ALL.
I'll take this ... I think I have a fix for it.
Assignee: jfrancis → kin
Keywords: dataloss
Priority: -- → P3
Whiteboard: EDITORBASE
Attached patch Patch Rev 1 (obsolete) — — Splinter Review
The problem was that nsHTMLEditRules::WillDeleteSelection() was calling JoinNodesSmart() with the assumption that both startNode and sibling were of the same type (Text) ... but in reality startNode was a text node, and sibling was a BR node. Note that because the 2 nodes are of different types that can't be joined, things fail part of the way through the execution of the join transaction, which is why you can't Undo to get the line back. Patch Rev 1 makes sure that they are both text nodes before it tries to join them. Can I get a review and super review for this?
Status: NEW → ASSIGNED
Keywords: nsbranch
Whiteboard: EDITORBASE → [EDITORBASE] FIX IN HAND, need r= and sr=
Comment on attachment 53951 [details] [diff] [review] Patch Rev 1 sr=sfraser
Attachment #53951 - Flags: superreview+
I have revised the patch somewhat. Thanks kin for debugging this! r=jfrancis
Whiteboard: [EDITORBASE] FIX IN HAND, need r= and sr= → [EDITORBASE] FIX IN HAND
Marking as PDT.
Whiteboard: [EDITORBASE] FIX IN HAND → [EDITORBASE] FIX IN HAND [PDT]
Sheela - can you see if this was in 6.1?
Withdrawing nsbranch nomination since I don't think the changes that caused this problem exist on the 0.9.4.
Keywords: nsbranch
Sheela - Can we double check and make sure this is not on the branch?
I tried this on 2001-10-17-16 branch build on win98. Also checked this on windows 2000 on 2001-10-18-05 build. I was not able to reproduce this problem or I did not see the whole line getting deleted or caret freeze I also checked this on 6.1RTM build and did not see this problem. So could be only on the trunk.
QA Contact: sheelar → sujay
Comment on attachment 53996 [details] [diff] [review] patch for editor/libeditor/html/nsHTMLEditRules.cpp r=jfrancis@netscape.com sr=sfraser@netscape.com
Attachment #53996 - Flags: superreview+
Attachment #53996 - Flags: review+
Attachment #53951 - Attachment is obsolete: true
103251 seems to be the same. It is not marked as such, though. I have some problem which seems related to that bug (but I am not absolutely positive). After you run into this delete bug the automatic line breaking does no longer work. Not always and often only after some normal paragraphs. So you type and the line becomes longer and longer (text editor, who uses HTML anyways;-). pi
Fix checked into TRUNK: mozilla/editor/libeditor/html/nsHTMLEditRules.cpp revision 1.201 Boris - If you still see the problem after trying a 10/19/01 trunk build (built after 7am pdt), open a *different* bug.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
*** Bug 103251 has been marked as a duplicate of this bug. ***
Whiteboard: [EDITORBASE] FIX IN HAND [PDT] → [EDITORBASE] [PDT] fixed on trunk
Based on Sheela testing this seems to be only on the trunk = PDT-
Whiteboard: [EDITORBASE] [PDT] fixed on trunk → [EDITORBASE] [PDT-] fixed on trunk
*** Bug 104936 has been marked as a duplicate of this bug. ***
*** Bug 104779 has been marked as a duplicate of this bug. ***
*** Bug 107124 has been marked as a duplicate of this bug. ***
Verified on build 2001110903.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: