From 2187e986dea4bea403f9efedb36555ea9ed28cc3 Mon Sep 17 00:00:00 2001 From: Phil Derksen Date: Fri, 12 Dec 2014 11:34:48 -0800 Subject: [PATCH] Trim the trailing space left by a new tag's label. --- src/select.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/select.js b/src/select.js index b4efeabca..c92589911 100644 --- a/src/select.js +++ b/src/select.js @@ -410,7 +410,8 @@ item = ctrl.tagging.fct(ctrl.search); // if item type is 'string', apply the tagging label } else if ( typeof item === 'string' ) { - item = item.replace(ctrl.taggingLabel,''); + // trim the trailing space + item = item.replace(ctrl.taggingLabel,'').trim(); } } }