Skip to content

Commit

Permalink
Fix #11757. IE 6/7 can't clean up circular DOM-JS refs.
Browse files Browse the repository at this point in the history
Why? Because it's dumb. Verified with the case in the ticket.
  • Loading branch information
dmethvin committed Jun 22, 2012
1 parent d5658e9 commit ad8dc12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jQuery.support = (function() {
eventName,
i,
isSupported,
clickFn,
div = document.createElement("div");

// Preliminary tests
Expand Down Expand Up @@ -112,12 +113,13 @@ jQuery.support = (function() {
}

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

// Check if a radio maintains its value
Expand Down

0 comments on commit ad8dc12

Please sign in to comment.