Skip to content

Commit

Permalink
fix autocomplete with autofocus on when pressing enter or tab. fixes a…
Browse files Browse the repository at this point in the history
  • Loading branch information
aehlke committed Apr 27, 2013
1 parent 2428939 commit d416408
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
5 changes: 4 additions & 1 deletion js/tag-it.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,10 @@
event.preventDefault();
}

that.createTag(that._cleanedInput());
// Autocomplete will create its own tag from a selection and close automatically.
if (!that.tagInput.data('autocomplete-open')) {
that.createTag(that._cleanedInput());
}
}
}).blur(function(e){
// Create a tag when the element loses focus.
Expand Down
20 changes: 10 additions & 10 deletions js/tag-it.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d416408

Please sign in to comment.