From fa10428b041949d03efe5ab585a9e29bb7505ab4 Mon Sep 17 00:00:00 2001 From: Xorrizon Date: Mon, 26 Sep 2011 15:06:24 +0200 Subject: [PATCH] Fixed a bug where the "onAddTag" callback is fired before the input field is updated --- jquery.tagsinput.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jquery.tagsinput.js b/jquery.tagsinput.js index ecd7ed3..ed24242 100644 --- a/jquery.tagsinput.js +++ b/jquery.tagsinput.js @@ -58,6 +58,8 @@ $('#'+id+'_tag').blur(); } + $.fn.tagsInput.updateTagsField(this,tagslist); + if (options.callback && tags_callbacks[id] && tags_callbacks[id]['onAddTag']) { var f = tags_callbacks[id]['onAddTag']; f(value); @@ -69,7 +71,6 @@ f($(this), tagslist[i]); } } - $.fn.tagsInput.updateTagsField(this,tagslist); });