Fix :visible does not work properly when display:none is set directly on an element in IE8. Fixes #4512.
This commit is contained in:
parent
57c046f91c
commit
0229b83f7e
3 changed files with 29 additions and 8 deletions
|
@ -280,14 +280,9 @@ function getWH( elem, name, extra ) {
|
|||
|
||||
if ( jQuery.expr && jQuery.expr.filters ) {
|
||||
jQuery.expr.filters.hidden = function( elem ) {
|
||||
var width = elem.offsetWidth, height = elem.offsetHeight,
|
||||
skip = elem.nodeName.toLowerCase() === "tr";
|
||||
var width = elem.offsetWidth, height = elem.offsetHeight;
|
||||
|
||||
return width === 0 && height === 0 && !skip ?
|
||||
true :
|
||||
width > 0 && height > 0 && !skip ?
|
||||
false :
|
||||
(elem.style.display || jQuery.css( elem, "display" )) === "none";
|
||||
return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
|
||||
};
|
||||
|
||||
jQuery.expr.filters.visible = function( elem ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue