Skip to content

Commit

Permalink
Fix dialog too small when iframe not initially visible
Browse files Browse the repository at this point in the history
If the iframe is not initially visible, `boxSizingReliableVal` gets set to false, which triggers this code to set the wrong dialog width here:
https://github.com/jquery/jquery/blob/a7cc3a0f0418d168ff3818576161c5af24d0ca78/src/css.js#L418-L426

I think this should solve jquery/jquery-ui#2176.
  • Loading branch information
ssigwart committed Sep 12, 2023
1 parent a7cc3a0 commit 10e6273
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/css/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ define( [
if ( !div ) {
return;
}
// Don't run until window is visible (gh-2176)
if ( documentElement.offsetHeight === 0 ) {
return;
}

container.style.cssText = "position:absolute;left:-11111px;width:60px;" +
"margin-top:1px;padding:0;border:0";
Expand Down

0 comments on commit 10e6273

Please sign in to comment.