Skip to main content

Bug Tracker

Side navigation

#9333 closed bug (invalid)

Opened May 18, 2011 03:06PM UTC

Closed May 18, 2011 03:17PM UTC

Last modified May 18, 2011 03:25PM UTC

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

Reported by: keith.mcfarlane@me.com 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.

Attachments (0)
Change History (2)

Changed May 18, 2011 03:17PM UTC by timmywil comment:1

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/

Changed May 18, 2011 03:25PM UTC by keith.mcfarlane@me.com comment:2

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 ).