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