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

Commit 3f09e7e

Browse files
author
Patrick Williams
committed
adding support for tabbing out of a input element after making a selection
1 parent c4c3ccd commit 3f09e7e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/jquery.tokeninput.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ var DEFAULT_SETTINGS = {
5454

5555
// Behavioral settings
5656
allowFreeTagging: false,
57+
allowTabOut: false,
5758

5859
// Callbacks
5960
onResult: null,
@@ -337,6 +338,9 @@ $.TokenList = function (input, url_or_data, settings) {
337338
add_freetagging_tokens();
338339
} else {
339340
$(this).val("");
341+
if($(input).data("settings").allowTabOut) {
342+
return true;
343+
}
340344
}
341345
event.stopPropagation();
342346
event.preventDefault();

0 commit comments

Comments
 (0)