Closed Bug 103888 Opened 24 years ago Closed 23 years ago

Text on line below gets deleted when a style change for a lower line is made on the line above

Categories

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

defect

Tracking

()

VERIFIED FIXED
mozilla1.0

People

(Reporter: TucsonTester2, Assigned: mjudge)

References

Details

(Keywords: embed, topembed-, Whiteboard: EDITORBASE+ [adt2])

Attachments

(1 file, 1 obsolete file)

Build ID: 20011004 Composer does not properly backspace lines that had there styles changed on a previous line. Reproducible: Always Steps to Reproduce: 1.Open Composer 2.Type some text 3.Click on the bold button on the toolbar 4.Hit enter and type some text 5.Place the cursor at right end of the first line 6.Hit backspace Actual Results: The text on the line below gets deleted instead of the text on the line below. Expected Results: I would expect that the line I place the cursor on would be deleted.
This bug only occurs if you place the cursor (step 5) by using a mouse click. If you move the cursor using the error keys instead, then backspacing works correctly. Also the problem isn't backspacing only. In step 6, if you hit the enter key instead of hitting backspace, then instead of adding a blank line between the two lines of text you have already entered, the cursor will move to the line below the second line of text. If, in step 6, you type some text instead of hitting backspace or enter, the text will be added to the end of the second line instead of to the end of the first line. Steps to Reproduce: 1.Open Composer 2.Type some text 3.Click on the bold button on the toolbar 4.Hit enter and type some text 5.Click at the end of the first line so the cursor is there 6.Enter text Actual result: Text will be added to the end of the second line Expected result: Text should have been entered at end of first line. Basically, when you click at the end of the first line, it places the cursor correctly, but any action you take will be treated as if it is at the end of the second line (at the end of the formatting that was set in step 3). But this only happens when using a mouse click to place the cursor at the end of the first line, and only if the first line ends with a tag for a format change (bold, italic, underline, big text, small text, etc).
Nice edge case. EDITORBASE, assigning to mjudge.
Assignee: syd → mjudge
Component: Editor: Composer → Editor: Core
Whiteboard: EDITORBASE
*** Bug 107727 has been marked as a duplicate of this bug. ***
Status: UNCONFIRMED → NEW
Ever confirmed: true
the bug has been here since 0.9.4....
In build 2001121003 this is still an issue. Also notice that when you hit " enter " after changing the text style, the caret jumps to the beginning of the first line of text.
recommend on EDITORBASE- since this will include some layout hacking tog et the correct keyboard navigation around css remenants working.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
Making EDITORBASE+. Simple, common action results in unexpected behavior.
Whiteboard: EDITORBASE → EDITORBASE+
Keywords: nsbeta1+
Priority: -- → P1
Keywords: topembed
Keywords: topembedembed, topembed-
Whiteboard: EDITORBASE+ → EDITORBASE+ [adt2]
this will disable the "helpful" adjustment of selection when a point is outside of the frames area. in the past we would set the content offset of the frames content to '+1' when the point is "right" of the frames rectangle. This causes problems in splittable frames when the first frame is 0 width. this simply defaults to <parent content>,(frame content'soffset) rather than adding 1 to the offset since the point is to the left of the frame's rectangle.
added comment to refer to this bug and to explain that we mean to not skip past content offsets that have frames with no size.
Attachment #77570 - Attachment is obsolete: true
Comment on attachment 77933 [details] [diff] [review] added comment to patch. jfrancis has reviewd it. he told me to put his review marker on it.
Attachment #77933 - Flags: review+
Comment on attachment 77933 [details] [diff] [review] added comment to patch. sr=kin@netscape.com
Attachment #77933 - Flags: superreview+
Comment on attachment 77933 [details] [diff] [review] added comment to patch. a=asa (on behalf of drivers) for checkin to the 1.0 branch
Attachment #77933 - Flags: approval+
adding adt1.0.0 nomination
Keywords: adt1.0.0
Pls check this into the trunk for a couple of days, and have QA verify that the patch resolves the issue, and does not cause any regression.
sujay - any word on the verification for this one? were there any regressions introduced?
I cannot verify this until one of two things happens: 1) Mike checks it into the trunk 2) Mike gives me an optimized build with this patch
this was checked into trunk today check it out.
adt requests you test bug on trunk and update bug with results. Thanks!
verified fix on 4/18 trunk. looks good. problem is gone now.
adt1.0.0+ (on ADT's behalf) approval for checkin to the 1.0 branch. Pls check this into the 1.0 branch asap, then add the keyword fixed1.0.0. thanks for you patience mike!
Keywords: adt1.0.0adt1.0.0+
Keywords: fixed1.0.0
changing to fixed branch as well as trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
If this is truly fixed on the branch, pls add the keyword fixed1.0.0.
verified on 4/19 branch also. However, I discovered a bug during additional testing this time. There is a problem after step 2) . If you enter a space after the text then there is no problem, but if you don't enter a space. then when you hit return, the caret jumps to the beginning of the first line. Should I reopen this bug ? or file a new one?
actually the problem occurs regardless if you enter a space or not. filed bug 138608 on new issue. marking this bug verified because the new problem does not stop me from verifying this fix. the workaround is to just keep typing and the caret jumps to the correct position.
Status: RESOLVED → VERIFIED
Keywords: verified1.0.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: