From 5f283a6b7f44ef93764805c047b9576cc085aef7 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 16 Mar 2013 04:02:27 -0400 Subject: [PATCH] Fix tag selector glitch after removing last tag, again Better fix than 4e1fbf9747 --- chrome/content/zotero/bindings/tagselector.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/chrome/content/zotero/bindings/tagselector.xml b/chrome/content/zotero/bindings/tagselector.xml index 88a969426c..413fa516e1 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);