Bug Tracker

Modify

Ticket #9333 (closed bug: invalid)

Opened 2 years ago

Last modified 2 years ago

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:
Blocking: Blocked by:

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

comment:1 Changed 2 years ago by timmywil

  • Priority changed from undecided to low
  • Resolution set to invalid
  • Status changed from new to closed
  • Component changed from unfiled to manipulation

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.