File tree 3 files changed +8
-1
lines changed 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,12 @@ $(function() {
114
114
<td valign="top"><code>boolean</code></td>
115
115
<td valign="top"><code>false</code></td>
116
116
</tr>
117
+ <tr>
118
+ <td valign="top"><code>selectOnTab</code></td>
119
+ <td valign="top">If true, the tab key will choose the currently selected item.</td>
120
+ <td valign="top"><code>boolean</code></td>
121
+ <td valign="top"><code>false</code></td>
122
+ </tr>
117
123
<tr>
118
124
<th valign="top" colspan="4" align="left"><a href="#data_searching" name="data_searching">Data / Searching</a></th>
119
125
</tr>
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ Selectize.defaults = {
12
12
maxItems : null ,
13
13
hideSelected : null ,
14
14
addPrecedence : false ,
15
+ selectOnTab : false ,
15
16
preload : false ,
16
17
17
18
scrollDuration : 60 ,
Original file line number Diff line number Diff line change @@ -431,7 +431,7 @@ $.extend(Selectize.prototype, {
431
431
self . advanceSelection ( 1 , e ) ;
432
432
return ;
433
433
case KEY_TAB :
434
- if ( self . isOpen && self . $activeOption ) {
434
+ if ( self . settings . selectOnTab && self . isOpen && self . $activeOption ) {
435
435
self . onOptionSelect ( { currentTarget : self . $activeOption } ) ;
436
436
}
437
437
if ( self . settings . create && self . createItem ( ) ) {
You can’t perform that action at this time.
0 commit comments