Skip to content

Commit

Permalink
Move clearing the support vars to before the offset doc ready call in…
Browse files Browse the repository at this point in the history
… case the offset tests are run synchronously. Fixes #10737.

- Adding a test for this would probably slow the manipulation tests significantly, but it's simple enough.
  • Loading branch information
timmywil committed Nov 10, 2011
1 parent e977a85 commit d589709
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,12 @@ jQuery.support = (function() {
}
}

testElement.innerHTML = "";
testElementParent.removeChild( testElement );

// Null connected elements to avoid leaks in IE
testElement = fragment = select = opt = body = marginDiv = div = input = null;

// Run fixed position tests at doc ready to avoid a crash
// related to the invisible body in IE8
jQuery(function() {
Expand Down Expand Up @@ -311,12 +317,6 @@ jQuery.support = (function() {
jQuery.extend( support, offsetSupport );
});

testElement.innerHTML = "";
testElementParent.removeChild( testElement );

// Null connected elements to avoid leaks in IE
testElement = fragment = select = opt = body = marginDiv = div = input = null;

return support;
})();

Expand Down

0 comments on commit d589709

Please sign in to comment.