File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -1282,7 +1282,7 @@ $.extend(Selectize.prototype, {
1282
1282
var $item , $option , $options ;
1283
1283
var self = this ;
1284
1284
var inputMode = self . settings . mode ;
1285
- var i , active , value_next ;
1285
+ var i , active , value_next , wasFull ;
1286
1286
value = hash_key ( value ) ;
1287
1287
1288
1288
if ( self . items . indexOf ( value ) !== - 1 ) {
@@ -1292,15 +1292,13 @@ $.extend(Selectize.prototype, {
1292
1292
1293
1293
if ( ! self . options . hasOwnProperty ( value ) ) return ;
1294
1294
if ( inputMode === 'single' ) self . clear ( ) ;
1295
- if ( inputMode === 'multi' && self . isFull ( ) ) {
1296
- self . refreshState ( ) ;
1297
- return ;
1298
- }
1295
+ if ( inputMode === 'multi' && self . isFull ( ) ) return ;
1299
1296
1300
1297
$item = $ ( self . render ( 'item' , self . options [ value ] ) ) ;
1298
+ wasFull = self . isFull ( ) ;
1301
1299
self . items . splice ( self . caretPos , 0 , value ) ;
1302
1300
self . insertAtCaret ( $item ) ;
1303
- if ( ! this . isPending ) {
1301
+ if ( ! this . isPending || ( ! wasFull && self . isFull ( ) ) ) {
1304
1302
self . refreshState ( ) ;
1305
1303
}
1306
1304
You can’t perform that action at this time.
0 commit comments