Closed
Bug 189225
Opened 22 years ago
Closed 21 years ago
Deleting text at begining of a line adds an extra space
Categories
(Core :: DOM: Editor, defect)
Tracking
()
RESOLVED
FIXED
M1
People
(Reporter: kinmoz, Assigned: mozeditor)
References
(Blocks 1 open bug)
Details
(Whiteboard: EDITORBASE+, fixinhand)
Attachments
(1 file)
949 bytes,
patch
|
Brade
:
review+
kinmoz
:
superreview+
|
Details | Diff | Splinter Review |
If I load the following example into composer: <body><b>foo</b> bar</body> and hilite the word "foo" and hit backspace, I end up with 2 spaces before the word "bar": <body> bar</body> It seems that nsWSRunObject::ConvertToNBSP() fails to delete the space it is trying to replace with the nbsp because the point returned by GetAsciiWSBounds() contains no node. It looks like it might be due to the fact that GetWSPointAfter() assumes that the node passed in will be in the mNodeArray, which in this case, it isn't. GetWSPointAfter() gets invoked via a call chain that looks like this: ConvertToNBSP()->GetAsciiWSBounds()->GetCharAfter()->GetWSPointAfter() FYI: This bug is present in the MOZILLA_1_0_BRANCH as well as the TRUNK and tends to throw off the offset tracking used in the TextServices, resulting in the wrong things getting selected and replaced during spellchecking.
Assignee | ||
Comment 1•22 years ago
|
||
Good catch; nice test case. Nominating nsbeta1.
Assignee | ||
Updated•22 years ago
|
Assignee | ||
Comment 2•22 years ago
|
||
Assignee | ||
Updated•22 years ago
|
Attachment #113980 -
Flags: superreview?(kin)
Attachment #113980 -
Flags: review?(brade)
Assignee | ||
Comment 3•22 years ago
|
||
make the ConvertToNBSP() call on the right object, so that it will be examining the correct data structures when gathering info for the conversion.
Whiteboard: EDITORBASE+ → EDITORBASE+, fixinhand
Comment 4•22 years ago
|
||
Comment on attachment 113980 [details] [diff] [review] fix for nsWSRunObject.cpp r=brade
Attachment #113980 -
Flags: review?(brade) → review+
Comment on attachment 113980 [details] [diff] [review] fix for nsWSRunObject.cpp sr=kin@netscape.com
Attachment #113980 -
Flags: superreview?(kin) → superreview+
Updated•22 years ago
|
QA Contact: sujay → sairuh
Assignee | ||
Comment 6•21 years ago
|
||
fix landed on trunk
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 7•21 years ago
|
||
testing with 2003.04.03 comm trunk builds, i still get bar as the result after deleting the bold foo. it didn't matter if i selected foo via click-drag or click-shift-arrow-key. reopening. unless i'm misunderstanding something?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 8•21 years ago
|
||
I see bar (no interveneing space). closing again...
Status: REOPENED → RESOLVED
Closed: 21 years ago → 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•