Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option to preserve tab-key action in case there is tag limit set a... #162

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
9 changes: 6 additions & 3 deletions tagmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
tagCloseIcon: 'x',
tagClass: '',
validator: null,
onlyTagList: false
onlyTagList: false,
preserveTabFocus: false
};

// exit when no matched elements
Expand Down Expand Up @@ -363,7 +364,9 @@

var applyDelimiter = function (e) {
pushTag(obj.val());
e.preventDefault();
if(e.keyCode === 9 && tagManagerOptions.preserveTabFocus !== true){
e.preventDefault();
}
};

var returnValue = null;
Expand Down Expand Up @@ -397,7 +400,7 @@
obj.data("tlis", tlis); //list of string tags
obj.data("tlid", tlid); //list of ID of the string tags

if (tagManagerOptions.output == null) {
if (tagManagerOptions.output == null) {
var hiddenObj = jQuery('<input/>', {
type: 'hidden',
name: tagManagerOptions.hiddenTagListName
Expand Down