Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#9333 closed bug (invalid)

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

Reported by: [email protected] 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 12 years ago by Timmy Willison

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 12 years ago by [email protected]

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.