#5524 closed bug (duplicate)
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.
Change History (6)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
will this be fixed? as I see it's a bug for more than 2 years now.. (same as #3016)
comment:3 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Closing as a duplicate of #3016.
comment:5 follow-up: 6 Changed 10 years ago by
3 years and no patch? anyone interested in resolving this? I have no idea how to propose patched code to the jQuery team
comment:6 Changed 10 years ago by
Replying to 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.