diff --git a/src/select.js b/src/select.js index 44edd8e21..c450b7a3d 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(); } } }