File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ $.extend(Selectize.prototype, {
156156 keypress : function ( ) { return self . onKeyPress . apply ( self , arguments ) ; } ,
157157 resize : function ( ) { self . positionDropdown . apply ( self , [ ] ) ; } ,
158158 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 ) ; }
160160 } ) ;
161161
162162 $document . on ( 'keydown' + eventNS , function ( e ) {
@@ -519,8 +519,11 @@ $.extend(Selectize.prototype, {
519519 self . isFocused = false ;
520520 if ( self . ignoreFocus ) return ;
521521
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+
524527 return ;
525528 }
526529
You can’t perform that action at this time.
0 commit comments