Closed
Bug 14803
Opened 25 years ago
Closed 25 years ago
textarea not setting value properly
Categories
(Core :: Layout: Form Controls, defect, P3)
Tracking
()
M12
People
(Reporter: rginda, Assigned: buster)
Details
Attachments
(1 file)
1.01 KB,
text/html
|
Details |
Load attached test case in apprunner select initial text and delete it enter 'a\nb\n' (where \n is [ENTER], not a literal '\' and 'n') click [Clear Value] * the value will be cleared enter 'c\nd\n' click [Clear Value] * the value WILL NOT be cleared click [Set Value to 'foo\nbar\n' * 'foo\nbar\n' will be PRE-PENDED to the existing text, instead of replacing it clear all text from the textarea click [Dump Value] * the value will still have a '\n' in it. This problem does not show up if '\n' is not part of the value keyed in, eg: entering 'a', [Clear Value], 'b', [Clear Value], 'c', [Clear Value] works as expected.
Updated•25 years ago
|
Assignee: trudelle → karnaze
Component: XP Toolkit/Widgets → HTML Form Controls
Comment 2•25 years ago
|
||
this is an HTML form control, not an xptoolkit widget. reassigning.
Updated•25 years ago
|
Assignee: karnaze → buster
Comment 3•25 years ago
|
||
Reassigning to Steve.
accepting, setting target milestone to M12
Status: NEW → ASSIGNED
Target Milestone: M12
Updated•25 years ago
|
QA Contact: beppe → gerardok
Comment 5•25 years ago
|
||
change qa contact to gerardok
Updated•25 years ago
|
Summary: gfx textarea not setting value properly → textarea not setting value properly
Comment 6•25 years ago
|
||
I tracked this down to the following: in nsGfxTextControlFrame::SelectAllTextContent there is this line: nsCOMPtr<nsIDOMCharacterData>text = do_QueryInterface(lastChild); This line results in text being null in the case where the last character is /n so the selection is not made and therefore not replaced when the new text is set/ inserted. It seems to me that we should have/use SelectAll to avoid these edge cases across the various usages of the editor.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
dup of 18859. kathy diagnosed the problem correctly, kin and joe found the same solution for a similar problem that they already fixed. I'll remove the dead code. *** This bug has been marked as a duplicate of 18859 ***
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 8•25 years ago
|
||
verifying as a dup.
You need to log in
before you can comment on or make changes to this bug.
Description
•