Bug Tracker

Opened 14 years ago

Closed 14 years ago

#4105 closed bug (fixed)

clone(true) fails on IE7

Reported by: htoug Owned by:
Priority: major Milestone:
Component: core Version: 1.2.6
Keywords: clone Cc:
Blocked by: Blocking:


I have a form, where part of the form is dynamic. The user can add field-sets and in each fieldset add one or more fields. This is done by having a hidden prototype and a couple of buttons to add fields-sets and fields. Everything work perfectly in FF3. In IE7 I get a javascript error from the jQuery clone function when 'Add Fieldset' button is pressed. The error comes from the copying of events on the triggered field_add function call.

Debugging indicates that clone has fewer elements than this.find("*").andSelf().each() calls. In the included (reduced) example the error occurs in line 1824 with the variable 'i' having value 3 and clone having a length of 2. Therefore 'clone[i]' is undefined and the clone-call fails.

Chaning 'clone(true)' to 'clone()' removes the problem, but gives me the pain of having to reset all events at every addition.

Attachments (1)

custom1.html (2.1 KB) - added by htoug 14 years ago.
Exmple of the error - reduced to 1 page.

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by htoug

Attachment: custom1.html added

Exmple of the error - reduced to 1 page.

comment:1 Changed 14 years ago by dmethvin

I think this may have been fixed along with #3500.

comment:2 Changed 14 years ago by dmethvin

Resolution: fixed
Status: newclosed

I'll close this as fixed, reopen with a test case if it's still in 1.3.2.

Note: See TracTickets for help on using tickets.