Closed Bug 600803 Opened 12 years ago Closed 12 years ago

setting value with newline on textarea has excess newline

Categories

(Core :: DOM: Editor, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b7

People

(Reporter: kdevel, Assigned: ehsan.akhgari)

References

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:2.0b7pre) Gecko/20100101 Firefox/4.0b7pre
Build Identifier: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b7pre) Gecko/20100929 Firefox/4.0b7pre

Assigning strings with newlines to values of textareas show unexpected excess newlines.

Reproducible: Always

Steps to Reproduce:
1. click "insert test"
2. textareas unexpectedly differ.
3.
Actual Results:  
right textarea shows:
--- begin ---
aaa
bbb

X
--- end ---

Expected Results:  
same view as left:
--- begin ---
aaa
bbb
X
--- end ---

Seems to be related to Bug 600570

code fragment:

tb.value = "aaa\nbbb";
tb.value = "aaa\nbbb\n";
tb.value += "X";
Attached file testcase
So this is fixed by the patch in bug 600570?

Ehsan, do we need to add this testcase too?
Depends on: 600570
(In reply to comment #2)
> So this is fixed by the patch in bug 600570?

Yes.

> Ehsan, do we need to add this testcase too?

I'll create one and attach it here.
Assignee: nobody → ehsan
Status: UNCONFIRMED → ASSIGNED
Component: General → Editor
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → editor
Version: unspecified → Trunk
Attached patch TestSplinter Review
Attachment #481615 - Flags: review?(bzbarsky)
Attachment #481615 - Flags: review?(bzbarsky) → review+
Whiteboard: [needs landing]
http://hg.mozilla.org/mozilla-central/rev/77084e9dd18b
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs landing]
Target Milestone: --- → mozilla2.0b8
Target Milestone: mozilla2.0b8 → mozilla2.0b7
You need to log in before you can comment on or make changes to this bug.