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

Commit 5fb6105

Browse files
committed
Merge pull request #444 from masonblier/master
Bug on blur when freeTagging is enabled
2 parents bce4dbd + 7570b8a commit 5fb6105

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/jquery.tokeninput.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,12 @@ $.TokenList = function (input, url_or_data, settings) {
252252
})
253253
.blur(function () {
254254
hide_dropdown();
255-
$(this).val("");
256-
token_list.removeClass($(input).data("settings").classes.focused);
257-
255+
258256
if ($(input).data("settings").allowFreeTagging) {
259257
add_freetagging_tokens();
260-
} else {
261-
$(this).val("");
262258
}
259+
260+
$(this).val("");
263261
token_list.removeClass($(input).data("settings").classes.focused);
264262
})
265263
.bind("keyup keydown blur update", resize_input)

0 commit comments

Comments
 (0)