From 73c1d9d86560707b9733045afb28fbd0c1580295 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sat, 17 Sep 2016 13:40:09 +0200 Subject: [PATCH] Fixed alignment calculation of dropdowns --- .../install/files/js/WoltLabSuite/Core/Ui/Alignment.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Alignment.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Alignment.js index 015acc1bdd..d7c0755865 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Alignment.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Alignment.js @@ -190,10 +190,15 @@ define(['Core', 'Language', 'Dom/Traverse', 'Dom/Util'], function(Core, Language } } else if (align === 'right') { - right = windowWidth - (refOffsets.left + refDimensions.width); - if (right < 0) { + if (refOffsets.left + refDimensions.width < elDimensions.width) { result = false; } + else { + right = windowWidth - (refOffsets.left + refDimensions.width); + if (right < 0) { + result = false; + } + } } else { left = refOffsets.left + (refDimensions.width / 2) - (elDimensions.width / 2); -- 2.20.1