Call .is(:visible) on the window or document does not thrown an error in IE. Fixes #10267.

This commit is contained in:
timmywil
2011-09-15 09:27:36 -04:00
parent daeb665045
commit 76a84fba94
2 changed files with 9 additions and 6 deletions

View File

@@ -371,7 +371,7 @@ if ( jQuery.expr && jQuery.expr.filters ) {
var width = elem.offsetWidth,
height = elem.offsetHeight;
return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
};
jQuery.expr.filters.visible = function( elem ) {