From: Alexander Ebert Date: Tue, 14 Oct 2014 18:01:07 +0000 (+0200) Subject: Fixed empty dropdown menus behaving weird X-Git-Tag: 2.1.0_Alpha_1~230 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f58abdcd8d19622ce19fcbbd2daf9728cce57933;p=GitHub%2FWoltLab%2FWCF.git Fixed empty dropdown menus behaving weird --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 910d695dcd..0298822cc8 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -1009,7 +1009,7 @@ WCF.Dropdown = { this._notifyCallbacks($containerID, 'close'); } - else if ($containerID === $targetID) { + else if ($containerID === $targetID && $dropdownMenu[0].children.length > 0) { $dropdown.addClass('dropdownOpen'); $dropdownMenu.addClass('dropdownOpen'); @@ -7975,6 +7975,12 @@ WCF.InlineEditor = Class.extend({ */ _proxy: null, + /** + * list of trigger elements by element id + * @var object + */ + _triggerElements: { }, + /** * list of data to update upon success * @var array @@ -8078,7 +8084,7 @@ WCF.InlineEditor = Class.extend({ // build dropdown var $trigger = null; if (!this._dropdowns[$elementID]) { - $trigger = this._getTriggerElement(this._elements[$elementID]).addClass('dropdownToggle').wrap(''); + this._triggerElements[$elementID] = $trigger = this._getTriggerElement(this._elements[$elementID]).addClass('dropdownToggle').wrap(''); this._dropdowns[$elementID] = $('