Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#9333 closed bug (invalid)

Changes to <textartea> values not preserved by the jQuery clone function.

Reported by: keith.mcfarlane@… Owned by:
Priority: low Milestone: 1.next
Component: manipulation Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

Description

Cloning a <div> containing a <textatea> in which textarea.val( ) has been changed results in a "cloned" copy with the textarea.val() equal to the original (static) value ...

This noted with jQuery 1.6 and it seems ALL CURRENT BROWSERS, Safari, Opera, Firefox 4 and Chrome .. Example can be supplied if contested. This seems similar to order reported issues but seems more consistent and wide ranging.

Change History (2)

comment:1 Changed 8 years ago by timmywil

Component: unfiledmanipulation
Priority: undecidedlow
Resolution: invalid
Status: newclosed

This is expected behavior. Data (attached with .data()) and events do not include value. Value can be copied manually if needed. http://jsfiddle.net/timmywil/huwnD/3/

comment:2 Changed 8 years ago by keith.mcfarlane@…

Maybe be expected, but it's not at all intuitive. I would expect a clone to be an exact copy. Agree a work around is to set the values manually, however. I will make a note, but suggest you add an explanation to the documentation on .clone ( true ).

Note: See TracTickets for help on using tickets.