File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 3129
3129
return this ;
3130
3130
} ;
3131
3131
3132
- // get Bootstrap's keydown event handler for either Bootstrap 4 or Bootstrap 3
3133
- var bootstrapKeydown = $ . fn . dropdown . Constructor . _dataApiKeydownHandler || $ . fn . dropdown . Constructor . prototype . keydown ;
3132
+ // wait until whole page has loaded to set function in case Bootstrap isn't available yet
3133
+ var bootstrapKeydown = function ( ) { } ;
3134
3134
3135
3135
$ ( document )
3136
3136
. off ( 'keydown.bs.dropdown.data-api' )
3144
3144
// SELECTPICKER DATA-API
3145
3145
// =====================
3146
3146
$ ( window ) . on ( 'load' + EVENT_KEY + '.data-api' , function ( ) {
3147
+ // get Bootstrap's keydown event handler for either Bootstrap 4 or Bootstrap 3
3148
+ bootstrapKeydown = $ . fn . dropdown . Constructor . _dataApiKeydownHandler || $ . fn . dropdown . Constructor . prototype . keydown ;
3149
+
3147
3150
$ ( '.selectpicker' ) . each ( function ( ) {
3148
3151
var $selectpicker = $ ( this ) ;
3149
3152
Plugin . call ( $selectpicker , $selectpicker . data ( ) ) ;
You can’t perform that action at this time.
0 commit comments