From 54f98f12f6e838d978c78a550d556275ccda7b1d Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Tue, 7 Apr 2009 13:43:39 -0400 Subject: [PATCH] Be sure to clear the hidden tag form field as well --- kronolith/js/src/taggerAutoCompleter.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kronolith/js/src/taggerAutoCompleter.js b/kronolith/js/src/taggerAutoCompleter.js index 34c884720..4b0802654 100644 --- a/kronolith/js/src/taggerAutoCompleter.js +++ b/kronolith/js/src/taggerAutoCompleter.js @@ -28,7 +28,7 @@ var KronolithTagger = Class.create({ new Ajax.Autocompleter(params.trigger, params.resultsId, params.uri, params.params); // Prepopulate the tags and the container elements? - if (this.p.existing) { + if (typeof this.p.existing != 'undefined') { this.init(this.p.existing); } @@ -42,6 +42,9 @@ var KronolithTagger = Class.create({ $('kronolithTagACBox').select('li.kronolithTagACListItem').each(function(item) {this.removeTagNode(item) }.bind(this)); } + // Clear the hidden tags field + $(this.p.tags).value = ''; + // Add any initial values if (typeof existing != 'undefined' && existing.length) { for (var i = 0, l = existing.length; i < l; i++) { -- 2.11.0