Skip to content

Commit

Permalink
Merge pull request selectize#352 from cordmata/fixtabcreate
Browse files Browse the repository at this point in the history
Ensure control does not lose focus when selecting option with TAB.
  • Loading branch information
brianreavis committed Jun 2, 2014
2 parents c41c2d4 + d16cc5b commit fcc980f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/selectize.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ $.extend(Selectize.prototype, {
case KEY_TAB:
if (self.settings.selectOnTab && self.isOpen && self.$activeOption) {
self.onOptionSelect({currentTarget: self.$activeOption});
e.preventDefault();
}
if (self.settings.create && self.createItem()) {
e.preventDefault();
Expand Down

0 comments on commit fcc980f

Please sign in to comment.