Skip to content
Closed
Show file tree
Hide file tree
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
Binary file modified build/bootstrap-tagsinput.zip
Binary file not shown.
7 changes: 4 additions & 3 deletions dist/bootstrap-tagsinput.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
if (item) {
$('.tag', self.$container).filter(function() { return $(this).data('item') === item; }).remove();
$('option', self.$element).filter(function() { return $(this).data('item') === item; }).remove();
self.itemsArray.splice(self.itemsArray.indexOf(item), 1);
self.itemsArray.splice($.inArray(item, self.itemsArray), 1);
}

if (!dontPushVal)
Expand Down Expand Up @@ -273,8 +273,9 @@
self.add(this.map[text]);
},
matcher: function (text) {
return (text.toLowerCase().indexOf(this.query.trim().toLowerCase()) !== -1);
return ($.inArray(this.query.trim().toLowerCase(), text.toLowerCase()) !== -1);
},

sorter: function (texts) {
return texts.sort();
},
Expand Down Expand Up @@ -335,7 +336,7 @@
default:
// When key corresponds one of the confirmKeys, add current input
// as a new tag
if (self.options.freeInput && self.options.confirmKeys.indexOf(event.which) >= 0) {
if (self.options.freeInput && $.inArray(event.which, self.options.confirmKeys) >= 0) {
self.add($input.val());
$input.val('');
event.preventDefault();
Expand Down
6 changes: 2 additions & 4 deletions dist/bootstrap-tagsinput.min.js

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

Loading