From 734f409c0cfa471211b2f0e3e6816771263bb6a1 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 18 May 2015 18:25:38 +0200 Subject: [PATCH] Fixed alignment to top not handling scrollTop --- wcfsetup/install/files/js/WoltLab/WCF/UI/Alignment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } -- 2.20.1