From: Alexander Ebert Date: Mon, 18 May 2015 16:25:38 +0000 (+0200) Subject: Fixed alignment to top not handling scrollTop X-Git-Tag: 3.0.0_Beta_1~2387 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=734f409c0cfa471211b2f0e3e6816771263bb6a1;p=GitHub%2FWoltLab%2FWCF.git Fixed alignment to top not handling scrollTop --- diff --git a/wcfsetup/install/files/js/WoltLab/WCF/UI/Alignment.js b/wcfsetup/install/files/js/WoltLab/WCF/UI/Alignment.js index 5fa4a15483..cda84a8d7a 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/UI/Alignment.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/UI/Alignment.js @@ -223,7 +223,7 @@ define(['Core', 'Language', 'DOM/Traverse', 'DOM/Util'], function(Core, Language if (align === 'top') { var bodyHeight = document.body.clientHeight; bottom = (bodyHeight - refOffsets.top) + verticalOffset; - if (bottom + elDimensions.height > document.body.clientHeight) { + if (bodyHeight - (bottom + elDimensions.height) < document.body.scrollTop) { result = false; } }