From: Alexander Ebert Date: Tue, 27 Sep 2011 13:14:57 +0000 (+0200) Subject: Fixes #194, multiple language input not working if hitting p X-Git-Tag: 2.0.0_Beta_1~1767 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0eddcb5c097eace63f580e3d17854a6d75b93f48;p=GitHub%2FWoltLab%2FWCF.git Fixes #194, multiple language input not working if hitting p --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 852c874319..abe9eed148 100644 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -1649,13 +1649,12 @@ WCF.MultipleLanguageInput.prototype = { this._element.wrap('
'); var $wrapper = this._element.parent(); var $button = $('').prependTo($wrapper); - var $span = $button.children('span'); - $span.click($.proxy(this._enable, this)); + $button.click($.proxy(this._enable, this)); WCF.CloseOverlayHandler.addCallback(this._element.wcfIdentify(), $.proxy(this._closeSelection, this)); if (enableOnInit) { - $span.trigger('click'); + $button.trigger('click'); // pre-select current language this._list.children('li').each($.proxy(function(index, listItem) { @@ -1675,6 +1674,10 @@ WCF.MultipleLanguageInput.prototype = { _enable: function(event) { if (!this._isEnabled) { var $button = $(event.target); + if ($button.getTagName() == 'p') { + $button = $button.children('span'); + } + $button.addClass('active'); // insert list