Side navigation
#5524 closed bug (duplicate)
Opened November 17, 2009 02:30PM UTC
Closed October 24, 2010 05:01PM UTC
Last modified March 18, 2013 12:08PM UTC
clone() doesn't clone the textarea's text value
Reported by: | bluedevil2k | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.4 |
Component: | core | Version: | 1.3.2 |
Keywords: | clone textarea | Cc: | |
Blocked by: | Blocking: |
Description
When calling clone() on an entire DIV that contains multiple textarea elements, the cloned textarea's returns blank on a call to .val(), while the original still returns the correct text on .val().
Here's some sample code to reproduce the problem (assume there are multiple DIV's on the page, each with multiple textareas with text in them).
jQuery("div").each(function(){
var clone = jQuery(this).clone();
console.log(jQuery(this).find("textarea").eq(0).val()); will output correct text
console.log(clone.find("textarea").eq(0).val()); will output blank
});
This was seen in Firefox 3.5 and IE8.
Attachments (0)
Change History (6)
Changed December 11, 2009 10:30PM UTC by comment:1
Changed February 19, 2010 03:38PM UTC by comment:2
will this be fixed? as I see it's a bug for more than 2 years now.. (same as #3016)
Changed October 24, 2010 05:01PM UTC by comment:3
resolution: | → duplicate |
---|---|
status: | new → closed |
Closing as a duplicate of #3016.
Changed March 18, 2013 03:51AM UTC by comment:5
3 years and no patch? anyone interested in resolving this? I have no idea how to propose patched code to the jQuery team
Changed March 18, 2013 12:08PM UTC by comment:6
Replying to [comment:5 anonymous]:
3 years and no patch? anyone interested in resolving this?
You should read the discussions in the duplicates. Specifically, read http://bugs.jquery.com/ticket/3016#comment:17
I have no idea how to propose patched code to the jQuery team
Send a pull request on GitHub: http://contribute.jquery.org/code/
Closed dup #5641 with further discussion.