Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Tagging - Trim the selected string item #447

Merged
merged 1 commit into from
Dec 12, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@
// for `item` if it is a detected duplicate
if ( item === undefined ) return;
// create new item on the fly
item = ctrl.tagging.fct !== undefined ? ctrl.tagging.fct(ctrl.search) : item.replace(ctrl.taggingLabel,'');
item = ctrl.tagging.fct !== undefined ? ctrl.tagging.fct(ctrl.search) : item.replace(ctrl.taggingLabel,'').trim();
}
}
// search ctrl.selected for dupes potentially caused by tagging and return early if found
Expand Down