Closed Bug 224938 Opened 19 years ago Closed 19 years ago

cloneNode copies the original value of form elements, not the current value

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 197294

People

(Reporter: Nathan.Keynes, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030927
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030927

When using the cloneNode method on a DOM section containing form elements, the
new elements will have the same value as the source node had at page creation
time, not the value currently in the element.

Reproducible: Always

Steps to Reproduce:
1. Visit http://www.deadcoderemoval.net/dom-bug.html
2. Change the text in the input box to something else (ie "update")
3. Click "Add"

Actual Results:  
The new text box that is added contains the original value ("initial"), not what
the value was changed to in Step 2.

Expected Results:  
The new text box should be a copy of the current contents of the source nodes.

Confirmed to exist on Mozilla 1.4.1/Windows XP and Mozilla 1.5.0/Linux

*** This bug has been marked as a duplicate of 197294 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Component: DOM: Traversal-Range → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.