From a63d4f4d2157ad2191d429229607adbac9f0021c Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 14 Oct 2012 18:08:32 +0200 Subject: [PATCH] Fixed WCF.Dropdown alignment, thanks to @Gravatronics Fixes #763 --- wcfsetup/install/files/js/WCF.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 21ea2d3190..1b79ecdae8 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -655,12 +655,7 @@ WCF.Dropdown = { * @param jQuery dropdownMenu */ setAlignment: function(dropdown, dropdownMenu) { - if (dropdown) { - var $dropdownMenu = dropdown.find('.dropdownMenu:eq(0)'); - } - else { - var $dropdownMenu = dropdownMenu; - } + var $dropdownMenu = (dropdown) ? dropdown.find('.dropdownMenu:eq(0)') : dropdownMenu; // calculate if dropdown should be right-aligned if there is not enough space var $dimensions = $dropdownMenu.getDimensions('outer'); @@ -673,7 +668,7 @@ WCF.Dropdown = { right: '0px' }).addClass('dropdownArrowRight'); } - else { + else if ($dropdownMenu.css('right') != '0px') { $dropdownMenu.css({ left: '0px', right: 'auto' -- 2.20.1