File tree 1 file changed +6
-3
lines changed 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ $.extend(Selectize.prototype, {
156
156
keypress : function ( ) { return self . onKeyPress . apply ( self , arguments ) ; } ,
157
157
resize : function ( ) { self . positionDropdown . apply ( self , [ ] ) ; } ,
158
158
blur : function ( ) { return self . onBlur . apply ( self , arguments ) ; } ,
159
- focus : function ( ) { return self . onFocus . apply ( self , arguments ) ; }
159
+ focus : function ( ) { self . ignoreBlur = false ; return self . onFocus . apply ( self , arguments ) ; }
160
160
} ) ;
161
161
162
162
$document . on ( 'keydown' + eventNS , function ( e ) {
@@ -519,8 +519,11 @@ $.extend(Selectize.prototype, {
519
519
self . isFocused = false ;
520
520
if ( self . ignoreFocus ) return ;
521
521
522
- if ( document . activeElement === self . $dropdown_content [ 0 ] ) {
523
- self . $control_input . focus ( ) ;
522
+ // necessary to prevent IE closing the dropdown when the scrollbar is clicked
523
+ if ( ! self . ignoreBlur && document . activeElement === self . $dropdown_content [ 0 ] ) {
524
+ self . ignoreBlur = true ;
525
+ self . onFocus ( e ) ;
526
+
524
527
return ;
525
528
}
526
529
You can’t perform that action at this time.
0 commit comments