Skip to content
Permalink
Browse files
detachEvent is unnecessary since we're nulling div. Fixes #8873.
  • Loading branch information
timmywil committed May 25, 2011
1 parent 657b197 commit b8fc9d14a134f91f17bf96194da86d38231da005
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/support.js
@@ -109,11 +109,10 @@ jQuery.support = (function() {
}

if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
div.attachEvent( "onclick", function click() {
div.attachEvent( "onclick", function() {
// Cloning a node shouldn't copy over any
// bound event handlers (IE does this)
support.noCloneEvent = false;
div.detachEvent( "onclick", click );
});
div.cloneNode( true ).fireEvent( "onclick" );
}

1 comment on commit b8fc9d1

@SergioMorchon

This comment has been minimized.

Copy link

@SergioMorchon SergioMorchon commented on b8fc9d1 Nov 11, 2014

It is necessary due to IE8 memory leaks on non detached events, even nulling elements.

Please sign in to comment.