File tree 1 file changed +10
-1
lines changed 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ var Selectize = function($input, settings) {
28
28
isCmdDown : false ,
29
29
isCtrlDown : false ,
30
30
ignoreFocus : false ,
31
+ ignoreBlur : false ,
31
32
ignoreHover : false ,
32
33
hasOptions : false ,
33
34
currentResults : null ,
@@ -165,7 +166,7 @@ $.extend(Selectize.prototype, {
165
166
keypress : function ( ) { return self . onKeyPress . apply ( self , arguments ) ; } ,
166
167
resize : function ( ) { self . positionDropdown . apply ( self , [ ] ) ; } ,
167
168
blur : function ( ) { return self . onBlur . apply ( self , arguments ) ; } ,
168
- focus : function ( ) { return self . onFocus . apply ( self , arguments ) ; } ,
169
+ focus : function ( ) { self . ignoreBlur = false ; return self . onFocus . apply ( self , arguments ) ; } ,
169
170
paste : function ( ) { return self . onPaste . apply ( self , arguments ) ; }
170
171
} ) ;
171
172
@@ -555,6 +556,14 @@ $.extend(Selectize.prototype, {
555
556
self . isFocused = false ;
556
557
if ( self . ignoreFocus ) return ;
557
558
559
+ // necessary to prevent IE closing the dropdown when the scrollbar is clicked
560
+ if ( ! self . ignoreBlur && document . activeElement === self . $dropdown_content [ 0 ] ) {
561
+ self . ignoreBlur = true ;
562
+ self . onFocus ( e ) ;
563
+
564
+ return ;
565
+ }
566
+
558
567
if ( self . settings . create && self . settings . createOnBlur ) {
559
568
self . createItem ( false ) ;
560
569
}
You can’t perform that action at this time.
0 commit comments