From: Alexander Ebert Date: Mon, 29 Jul 2013 13:06:44 +0000 (+0200) Subject: Fixed overflow calculation for dialog overlays X-Git-Tag: 2.0.0_Beta_6~23 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c68d20567ac47dc839d51a1fcc9bb12e8ea3ed64;p=GitHub%2FWoltLab%2FWCF.git Fixed overflow calculation for dialog overlays --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 8fe0c8f2ed..0742818ef8 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -8647,6 +8647,18 @@ $.widget('ui.wcfDialog', { this._content.css('overflow', $overflow); this._content.css('maxHeight', $maxHeight); + + if ($overflow === 'visible') { + // content may already overflow, even though the overall height is still below the threshold + var $contentHeight = 0; + this._content.children().each(function(index, child) { + $contentHeight += $(child).outerHeight(); + }); + + if (this._content.height() < $contentHeight) { + this._content.css('overflow', 'auto'); + } + } }, /**