Skip to content
This repository was archived by the owner on Sep 10, 2023. It is now read-only.

Commit 2517562

Browse files
committed
Merge pull request #387 from fukuball/master
allowFreeTagging set to false not work should be fix
2 parents 39353a2 + 3135424 commit 2517562

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/jquery.tokeninput.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,11 @@ $.TokenList = function (input, url_or_data, settings) {
333333
add_token($(selected_dropdown_item).data("tokeninput"));
334334
hidden_input.change();
335335
} else {
336-
add_freetagging_tokens();
336+
if ($(input).data("settings").allowFreeTagging) {
337+
add_freetagging_tokens();
338+
} else {
339+
$(this).val("");
340+
}
337341
event.stopPropagation();
338342
event.preventDefault();
339343
}

0 commit comments

Comments
 (0)