diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2023-11-07 00:35:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-07 00:35:52 +0100 |
commit | b1e66a5faaf46ffcbcc27c79a9a224aaf851a987 (patch) | |
tree | c9d7be35b296bb57aee398f099b3786350ae8389 /src | |
parent | f47c6a83370675af0eff227d0266b40f9f45514a (diff) | |
download | jquery-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.js | 6 |
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 ) + |