Side navigation
#4105 closed bug (fixed)
Opened February 10, 2009 01:45PM UTC
Closed February 28, 2009 07:59PM UTC
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: |
Description
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.
I think this may have been fixed along with #3500.