Skip to content

Commit

Permalink
Style fix for the resize function
Browse files Browse the repository at this point in the history
The variable that is supposed to find the widest element on the page was getting NaN for a value and not treating that as 0.  Checking for that value and forcing a zero seems to have corrected the issue.
  • Loading branch information
wilpig committed Oct 11, 2023
1 parent 1ea6a2c commit 03b1bc2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sidebar.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ function subresize(){
main,cw=$('.main > .center').outerWidth();
widesttab+=58;

mw=(isNaN(mw))?0:mw;

// find widths
width=(cw>mw)?cw:mw;
main=(pnw>width)?pnw:width; // Find the largest width of possible content in maindiv
Expand Down

0 comments on commit 03b1bc2

Please sign in to comment.