From 0eddcb5c097eace63f580e3d17854a6d75b93f48 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 27 Sep 2011 15:14:57 +0200 Subject: [PATCH] Fixes #194, multiple language input not working if hitting p --- wcfsetup/install/files/js/WCF.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 -- 2.20.1