From 1b04903095ad206728edd1f945babf29d677f26d Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 15 May 2012 17:03:55 +0200 Subject: [PATCH] Fixed dropdown for i18n input Fixes #567 --- wcfsetup/install/files/js/WCF.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index b32510d197..397115b117 100644 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -2167,7 +2167,9 @@ WCF.MultipleLanguageInput.prototype = { $button.data('toggle', $wrapper.wcfIdentify()).click($.proxy(this._enable, this)); // add a special class if next item is a textarea + var $top = null; if ($button.next().getTagName() === 'textarea') { + $top = $button.outerHeight() - 1; $button.addClass('dropdownCaptionTextarea'); } else { @@ -2177,10 +2179,12 @@ WCF.MultipleLanguageInput.prototype = { // insert list this._list = $('').insertAfter($button); - // calculate top offset for menu - this._list.css({ - top: $button.parent().outerHeight() + 10 - }); + // set top offset for menu + if ($top !== null) { + this._list.css({ + top: $top + }); + } // insert available languages for (var $languageID in this._availableLanguages) { -- 2.20.1