Fixed pre-selection label dropdowns
authorAlexander Ebert <ebert@woltlab.com>
Mon, 4 Nov 2013 19:48:37 +0000 (20:48 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 4 Nov 2013 19:48:37 +0000 (20:48 +0100)
wcfsetup/install/files/js/WCF.Label.js

index a9ef8b8ac124896cb4270f503ae4a22721e39c2e..48a03aebab93f4e97759cb4687d8876e0d005f84 100644 (file)
@@ -139,7 +139,7 @@ WCF.Label.Chooser = Class.extend({
                // pre-select labels
                if ($.getLength(selectedLabelIDs)) {
                        for (var $groupID in selectedLabelIDs) {
-                               WCF.Dropdown.getDropdownMenu(this._groups[$groupID].wcfIdentify()).children('li').each($.proxy(function(index, label) {
+                               WCF.Dropdown.getDropdownMenu(this._groups[$groupID].wcfIdentify()).find('> ul > li:not(.dropdownDivider)').each($.proxy(function(index, label) {
                                        var $label = $(label);
                                        var $labelID = $label.data('labelID') || 0;
                                        if ($labelID && selectedLabelIDs[$groupID] == $labelID) {