Bug Tracker

Opened 14 years ago

Closed 12 years ago

Last modified 12 years ago

#3704 closed bug (duplicate)

clone(events) method loses defaultValue on IE

Reported by: mikesamuel Owned by: flesler
Priority: major Milestone: 1.2.5
Component: manipulation Version: 1.2.5
Keywords: Cc:
Blocked by: Blocking:

Description

http://docs.jquery.com/Manipulation/clone repairs problems with Node.cloneNode().

But some information not visible via innerHTML is lost.

The attached file should show original. value=changed original.defaultValue=initial

clone. value=changed clone.defaultValue=initial

but on IE6 shows

original. value=changed original.defaultValue=initial

clone. value=changed clone.defaultValue=changed

This likely also a problem for defaultSelected and defaultChecked. To test this in practice, create a form, change the contents of text input, click radio buttons, checkboxes, and select lists. Then close the form. If the bug is fixed, reset()ing the original and clone should return them to a similar state.

Attachments (1)

jquery-clone-test.html (752 bytes) - added by mikesamuel 14 years ago.
HTML testcase

Download all attachments as: .zip

Change History (6)

Changed 14 years ago by mikesamuel

Attachment: jquery-clone-test.html added

HTML testcase

comment:1 Changed 14 years ago by mikesamuel

I seem to have mangled the expected and actual output.

Expected:

original.       value=changed
original.defaultValue=initial
   clone.       value=changed
   clone.defaultValue=initial

On IE 6:

original.       value=changed
original.defaultValue=initial
   clone.       value=changed
   clone.defaultValue=changed

comment:2 Changed 14 years ago by dmethvin

Component: unfilledcore

comment:3 Changed 13 years ago by dmethvin

Component: coremanipulation

comment:4 Changed 12 years ago by snover

Resolution: duplicate
Status: newclosed

comment:5 Changed 12 years ago by snover

Duplicate of #3879.

Note: See TracTickets for help on using tickets.