From 520a2b061c1a1ea44dd298f3c7ba35900b3e1b46 Mon Sep 17 00:00:00 2001 From: Will S Date: Tue, 27 Dec 2011 09:06:50 -0500 Subject: [PATCH] Select appropriate tag when moving from changed tag using enter or tab (not for mouse click) --- chrome/content/zotero/bindings/tagsbox.xml | 25 ++++++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/chrome/content/zotero/bindings/tagsbox.xml b/chrome/content/zotero/bindings/tagsbox.xml index fe7bf61115..375e42a8f9 100644 --- a/chrome/content/zotero/bindings/tagsbox.xml +++ b/chrome/content/zotero/bindings/tagsbox.xml @@ -438,18 +438,29 @@ // when the notifier kicks in var existing = Zotero.Tags.getID(value, 0); if (existing && id != existing) { - this._tabDirection = false; + // this._tabDirection = false; } + var origTagIndex = this.item.getTagIndex(id); var changed = tagsbox.replace(id, value); if (changed) { - return; + var newTagIndex = this.item.getTagIndex(changed); + if (newTagIndex>origTagIndex) { + if (this._tabDirection == 1) { + this._lastTabIndex--; + } + } + else if (newTagIndex