aboutsummaryrefslogtreecommitdiffstats
path: root/src/support.js
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2012-06-22 09:46:07 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-06-22 09:46:07 -0400
commitad8dc12ac28915891127666d5b6c2d3200d1e79c (patch)
treef359ae3d406347da1585141d27fda043bb72520b /src/support.js
parentd5658e978d9a7234e537d57c45069ce223cb3853 (diff)
downloadjquery-ad8dc12ac28915891127666d5b6c2d3200d1e79c.tar.gz
jquery-ad8dc12ac28915891127666d5b6c2d3200d1e79c.zip
Fix #11757. IE 6/7 can't clean up circular DOM-JS refs.
Why? Because it's dumb. Verified with the case in the ticket.
Diffstat (limited to 'src/support.js')
-rw-r--r--src/support.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/support.js b/src/support.js
index 612e2942b..9d25c8f29 100644
--- a/src/support.js
+++ b/src/support.js
@@ -10,6 +10,7 @@ jQuery.support = (function() {
eventName,
i,
isSupported,
+ clickFn,
div = document.createElement("div");
// Preliminary tests
@@ -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