aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2023-11-07 00:35:52 +0100
committerGitHub <noreply@github.com>2023-11-07 00:35:52 +0100
commitb1e66a5faaf46ffcbcc27c79a9a224aaf851a987 (patch)
treec9d7be35b296bb57aee398f099b3786350ae8389 /src
parentf47c6a83370675af0eff227d0266b40f9f45514a (diff)
downloadjquery-b1e66a5faaf46ffcbcc27c79a9a224aaf851a987.tar.gz
jquery-b1e66a5faaf46ffcbcc27c79a9a224aaf851a987.zip
CSS: Fix reliableTrDimensions support test for initially hidden iframes
Closes gh-5358 Ref gh-5317 Ref gh-5359
Diffstat (limited to 'src')
-rw-r--r--src/css/support.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/css/support.js b/src/css/support.js
index 5f9b37d7f..c7229e93a 100644
--- a/src/css/support.js
+++ b/src/css/support.js
@@ -47,6 +47,12 @@ support.reliableTrDimensions = function() {
.appendChild( tr )
.appendChild( div );
+ // Don't run until window is visible
+ if ( table.offsetWidth === 0 ) {
+ documentElement.removeChild( table );
+ return;
+ }
+
trStyle = window.getComputedStyle( tr );
reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +
parseInt( trStyle.borderTopWidth, 10 ) +