I seem to have discovered an obscure bug in IE (6, I don't have a copy of 7 to test with) when using
that occurs when you clone an element with certain nested elements and events, and then clone it again. This is a regression from 1.2.3, which seems to have worked fine.
I had a hard time generalizing this bug as it seems to only happen in very specific circumstances, but I have attached a test case to demonstrate the behavior.
As far as I can tell, the most generic way to make the bug occur is to take a DOM node structured like so:
and bind an event to
and another event to
. Then, clone
, and then clone the clone using
again. Removing any of the surrounding
elements causes the bug to disappear, although swapping the class designation on the first set of nested
elements demonstrates the bug as well.
The specific error reported by IE is "'nodeType' is null or not an object" and occurs on the first line of the
if ( elem.nodeType == 3 || elem.nodeType == 8 )
I tried replacing the
function in 1.2.3 with the
function from the trunk, and 1.2.3 still doesn't demonstrate the bug, leading me to believe it's elsewhere that the issue's occurring. I compared the
functions from 1.2.3 and the trunk and didn't see any major changes that may have caused this sort of an issue, but at that point I was out of my league.
I'm not sure that this is a major regression, but it's a regression nonetheless, so I would imagine it should probably be fixed to maintain backwards compatibility.