Move clearing the support vars to before the offset doc ready call in 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.
This commit is contained in:
timmywil
2011-11-10 10:30:10 -05:00
parent e977a85b87
commit d589709851

View File

@@ -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() {
@@ -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;
})();