diff --git a/chrome/content/zotero/bindings/tagselector.xml b/chrome/content/zotero/bindings/tagselector.xml index 65cfae700..b2af3340f 100644 --- a/chrome/content/zotero/bindings/tagselector.xml +++ b/chrome/content/zotero/bindings/tagselector.xml @@ -226,9 +226,19 @@ // Remove children tagsToggleBox.textContent = ""; - var lastTag; + // Sort by name + var orderedTags = []; + var collation = Zotero.getLocaleCollation(); for (let tagID in self._tags) { - let tagButton = self._makeClickableTag(tagID, lastTag, self.editable); + orderedTags.push(self._tags[tagID]) + } + orderedTags.sort(function(a, b) { + return collation.compareString(1, a.name, b.name); + }); + + var lastTag; + for (let i=0; i - +