diff --git a/chrome/content/zotero/bindings/tagselector.xml b/chrome/content/zotero/bindings/tagselector.xml index 88a969426..413fa516e 100644 --- a/chrome/content/zotero/bindings/tagselector.xml +++ b/chrome/content/zotero/bindings/tagselector.xml @@ -329,14 +329,6 @@ break; } } - - // If tag isn't in scope and is still selected, - // deselect it - if (!inScope && self.selection[name]) { - labels[i].setAttribute('selected', false); - delete self.selection[name]; - var doCommand = true; - } } // If not in search, hide @@ -371,6 +363,14 @@ empty = false; } + // If tag isn't in scope and is still selected, deselect it + if (labels[i].getAttribute('hidden') == 'true' && self.selection[name]) { + labels[i].setAttribute('selected', false); + delete self.selection[name]; + var doCommand = true; + } + + // Always show colored tags at top if (colorData) { labels[i].setAttribute('hidden', false);