Skip to content

Commit fe05cf3

Browse files
gibson042timmywil
authored andcommitted
CSS: Stop Firefox from treating disconnected elements as cascade-hidden
Fixes jquerygh-2833 Ref dba93f7 Close jquerygh-2835
1 parent dbc4608 commit fe05cf3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/css/showHide.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ function showHide( elements, show ) {
5454
elem.style.display = "";
5555
}
5656
}
57-
if ( elem.style.display === "" && jQuery.css( elem, "display" ) === "none" ) {
57+
if ( elem.style.display === "" && jQuery.css( elem, "display" ) === "none" &&
58+
59+
// Support: Firefox <=42 - 43
60+
// Don't set inline display on disconnected elements with computed display: none
61+
jQuery.contains( elem.ownerDocument, elem ) ) {
62+
5863
values[ index ] = getDefaultDisplay( elem );
5964
}
6065
} else {

0 commit comments

Comments
 (0)