Skip to content

Commit

Permalink
Fixes #118 (prevent options from being added with keyboard when dropd…
Browse files Browse the repository at this point in the history
…own not open).
  • Loading branch information
brianreavis committed Sep 24, 2013
1 parent 46d0b35 commit 9e80f48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/selectize.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ $.extend(Selectize.prototype, {
e.preventDefault();
return;
case KEY_RETURN:
if (self.$activeOption) {
if (self.isOpen && self.$activeOption) {
self.onOptionSelect({currentTarget: self.$activeOption});
}
e.preventDefault();
Expand Down

0 comments on commit 9e80f48

Please sign in to comment.