Modify ↓
Ticket #2184 (closed bug: fixed)
clone won't work with THEAD, TFOOT, TBODY, TR and TD in MSIE
| Reported by: | kowcik | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.2.3 |
| Component: | core | Version: | 1.2.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Beacuse clone uses innerHTML if the detected browser is MS Internet Explorer, cloning won't work with these nodes. See attached test case.
Attachments
Change History
Changed 5 years ago by kowcik
-
attachment
clone.html
added
comment:1 Changed 5 years ago by kowcik
I've just checked with previously reported bugs, it is a duplicate of this bug: http://dev.jquery.com/ticket/2169, but my test-case is more extensive. I've went thru these test with 1.2.1 and all tested elements worked , so this is a regression.
Changed 5 years ago by davojan
-
attachment
fix-for-1.2.2-clone.diff
added
Another possible solution. It doesn't use clean() and should be faster, but it's bigger.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Script will attempt to clone table elements using jQuery methods and native DOM. Results will be alerted for comparison.