Fixed handling of preset values in ItemList.js
authorMarcel Werk <burntime@woltlab.com>
Sun, 28 Aug 2016 15:55:15 +0000 (17:55 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 28 Aug 2016 15:55:21 +0000 (17:55 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList.js

index 8fc4789d129b9e560a1698d0a6aadd2f627ef719..c6f6078a43d8781d301d126c7a3889b5d55bcd32 100644 (file)
@@ -240,16 +240,16 @@ define(['Core', 'Dictionary', 'Language', 'Dom/Traverse', 'WoltLabSuite/Core/Ui/
                                
                                list.parentNode.insertBefore(shadow, list);
                                
-                               if (element.nodeName === 'TEXTAREA') {
-                                       //noinspection JSUnresolvedVariable
-                                       var value, tmp = element.value.split(',');
-                                       for (var i = 0, length = tmp.length; i < length; i++) {
-                                               value = tmp[i].trim();
-                                               if (value.length) {
-                                                       values.push(value);
-                                               }
+                               //noinspection JSUnresolvedVariable
+                               var value, tmp = element.value.split(',');
+                               for (var i = 0, length = tmp.length; i < length; i++) {
+                                       value = tmp[i].trim();
+                                       if (value.length) {
+                                               values.push(value);
                                        }
-                                       
+                               }
+                               
+                               if (element.nodeName === 'TEXTAREA') {
                                        var inputElement = elCreate('input');
                                        inputElement.type = 'text';
                                        element.parentNode.insertBefore(inputElement, element);