From c68d20567ac47dc839d51a1fcc9bb12e8ea3ed64 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 29 Jul 2013 15:06:44 +0200 Subject: [PATCH] Fixed overflow calculation for dialog overlays --- wcfsetup/install/files/js/WCF.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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'); + } + } }, /** -- 2.20.1