Skip to content

Commit 9e80f48

Browse files
committed
Fixes selectize#118 (prevent options from being added with keyboard when dropdown not open).
1 parent 46d0b35 commit 9e80f48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/selectize.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ $.extend(Selectize.prototype, {
356356
e.preventDefault();
357357
return;
358358
case KEY_RETURN:
359-
if (self.$activeOption) {
359+
if (self.isOpen && self.$activeOption) {
360360
self.onOptionSelect({currentTarget: self.$activeOption});
361361
}
362362
e.preventDefault();

0 commit comments

Comments
 (0)