Ticket #3016 (closed bug: patchwelcome)
Textarea loses current value when cloned
| Reported by: | Jones | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | manipulation | Version: | 1.4.3 |
| Keywords: | firefox textarea value clone | Cc: | |
| Blocking: | Blocked by: |
Description
If you clone an element with a textarea in it and append this to another element, the value of the textarea is lost (or - if in the html a value for the textarea was set - the default value is set).
I found this behaviour only in firefox. I've attached a file with an example (and a dirty workaround I used).
Attachments
Change History
comment:1 Changed 2 years ago by Sly777
This problem is not fixed. I get this problem on version 1.3.2.
comment:2 Changed 2 years ago by szrudi
will this be fixed? as I see it's a bug for more than 2 years now..
comment:3 Changed 2 years ago by Eddie
I have the same problem :-( Currently using a really ugly workaround...
I don't know too much about Trac, but maybe this bug report does not show up anymore, since it is assigned to Milestone 1.3. But I have no rights to change that...
Eddie
comment:5 Changed 17 months ago by dmethvin
- Summary changed from Problems with textareas, its value, clone and firefox to Textarea loses current value when cloned
comment:7 Changed 17 months ago by jitter
This is actually a firefox bug and it's know and sits there unfixed since 2004
comment:8 Changed 16 months ago by snover
- Keywords firefox textarea value added; firefox, textarea, value, removed
- Priority changed from major to low
- Version changed from 1.2.6 to 1.4.3
- Status changed from new to open
- Milestone 1.4.3 deleted
Safari and Chrome both do the same thing as Firefox here and clone the state of the element without any value changes. Opera and IE clone current state of the control, including any value changes. Fun…
comment:10 Changed 14 months ago by dmethvin
- Status changed from open to closed
- Resolution set to patchwelcome
This is similar to #1736 (if not an outright dup) and seems equally difficult to fix in a general way. If someone needs the partial input typed by a user at the point of cloning it would make more sense to copy over the .value at that point. If someone has a better idea let us know.
comment:11 Changed 3 months ago by jakobhilden@…
Bug still exists in jQuery 1.6.2
Maybe this would be a solution? https://github.com/spencertipping/jquery.fix.textarea-clone
comment:12 Changed 3 months ago by rwaldron
@jakobhilden@… see the previous comment by dmethvin
comment:13 Changed 5 weeks ago by rwaldron
#11136 is a duplicate of this ticket.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

