@@ -74,7 +74,7 @@ const Lightbox = (($) => {
74
74
75
75
let header = `<div class="modal-header"${ this . _config . title || this . _config . alwaysShowClose ? '' : ' style="display:none"' } ><button type="button" class="close" data-dismiss="modal" aria-label="${ this . _config . strings . close } "><span aria-hidden="true">×</span></button><h4 class="modal-title">${ this . _config . title || " " } </h4></div>` ;
76
76
let footer = `<div class="modal-footer"${ this . _config . footer ? '' : ' style="display:none"' } >${ this . _config . footer || " " } </div>` ;
77
- let body = '<div class="modal-body"><div class="ekko-lightbox-container"><div class="ekko-lightbox-item fade in"></div><div class="ekko-lightbox-item fade"></div></div></div>'
77
+ let body = '<div class="modal-body"><div class="ekko-lightbox-container"><div class="ekko-lightbox-item fade in show "></div><div class="ekko-lightbox-item fade"></div></div></div>'
78
78
let dialog = `<div class="modal-dialog" role="document"><div class="modal-content">${ header } ${ body } ${ footer } </div></div>`
79
79
$ ( this . _config . doc . body ) . append ( `<div id="${ this . _modalId } " class="ekko-lightbox modal fade" tabindex="-1" tabindex="-1" role="dialog" aria-hidden="true">${ dialog } </div>` )
80
80
@@ -230,15 +230,15 @@ const Lightbox = (($) => {
230
230
$current = this . _$lightboxBodyTwo
231
231
}
232
232
233
- $current . removeClass ( 'in' )
233
+ $current . removeClass ( 'in show ' )
234
234
setTimeout ( ( ) => {
235
235
if ( ! this . _$lightboxBodyTwo . hasClass ( 'in' ) )
236
236
this . _$lightboxBodyTwo . empty ( )
237
237
if ( ! this . _$lightboxBodyOne . hasClass ( 'in' ) )
238
238
this . _$lightboxBodyOne . empty ( )
239
239
} , 500 )
240
240
241
- $toUse . addClass ( 'in' )
241
+ $toUse . addClass ( 'in show ' )
242
242
return $toUse
243
243
}
244
244
@@ -298,12 +298,12 @@ const Lightbox = (($) => {
298
298
show = show || false
299
299
if ( show ) {
300
300
this . _$modalDialog . css ( 'display' , 'none' )
301
- this . _$modal . removeClass ( 'in' )
301
+ this . _$modal . removeClass ( 'in show ' )
302
302
$ ( '.modal-backdrop' ) . append ( this . _config . loadingMessage )
303
303
}
304
304
else {
305
305
this . _$modalDialog . css ( 'display' , 'block' )
306
- this . _$modal . addClass ( 'in' )
306
+ this . _$modal . addClass ( 'in show ' )
307
307
$ ( '.modal-backdrop' ) . find ( '.ekko-lightbox-loader' ) . remove ( )
308
308
}
309
309
return this ;
@@ -559,10 +559,10 @@ const Lightbox = (($) => {
559
559
this . _$modalDialog . css ( 'width' , 'auto' ) . css ( 'maxWidth' , width ) ;
560
560
561
561
try {
562
- this . _$modal . modal ( '_handleUpdate' ) ;
562
+ // v4 method is mistakenly protected
563
+ this . _$modal . data ( 'bs.modal' ) . _handleUpdate ( ) ;
563
564
}
564
565
catch ( e ) {
565
- // backward compatibility for bootstrap v3
566
566
this . _$modal . data ( 'bs.modal' ) . handleUpdate ( ) ;
567
567
}
568
568
return this ;
0 commit comments