Closed
Bug 300817
Opened 19 years ago
Closed 19 years ago
cloneNode(textarea) will set defaultValue as value.
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 230307
People
(Reporter: brunoabdon+moziilabugzilla, Unassigned)
Details
Attachments
(1 file)
|
1.35 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 When a textarea is cloned with cloneNode, the clone will have it's 'value' attribute set to the 'defaultValue' from the original. That is, if you do: var textarea2 = textearea1.cloneNode(true); the textarea2.value will be equals to textearea1.defaultValue If this is expected behaviour (and I believe it isn't), so there's a bug on <input>s behaviour, as cloned inputs maintain the original value. Reproducible: Always Steps to Reproduce: 1.Change a textarea's value (contents) 2.Clone this textarea 3.Check the cloned textarea's value Actual Results: The clone textarea's value is the original textarea's defaultValue (value prior to change) Expected Results: The clone textarea's value should be the original textarea's value at cloning time. I'll be attaching a simple test case. Cloned inputs won't behave this way.
| Reporter | ||
Comment 3•19 years ago
|
||
Surely a dup. I'm moving my testcase there. (They alredy have one, but its too complicated (IMHO)). *** This bug has been marked as a duplicate of 230307 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•