Fixes initial autofocus of forced multilingual input fields
authorMatthias Schmidt <gravatronics@live.com>
Tue, 7 May 2013 06:48:44 +0000 (08:48 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 7 May 2013 06:48:44 +0000 (08:48 +0200)
Closes #1238

wcfsetup/install/files/js/WCF.js

index 41a6c89bafcb81909e122cb68bd7b61602dfb277..42bd3a241761732b728971fb24f5575206c796b8 100755 (executable)
@@ -3092,8 +3092,10 @@ WCF.MultipleLanguageInput = Class.extend({
                this._list.prev('.dropdownToggle').children('span').text(this._availableLanguages[this._languageID]);
                
                // close selection and set focus on input element
-               //this._closeSelection();
-               this._element.blur().focus();
+               if (this._didInit) {
+                       // this._closeSelection(); todo: still needed?
+                       this._element.blur().focus();
+               }
        },
        
        /**