File tree Expand file tree Collapse file tree
src/core/components/modal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ class Modal extends Framework7Class {
2222 modal . useModulesParams ( defaults ) ;
2323
2424 modal . params = Utils . extend ( defaults , params ) ;
25+ modal . opened = false ;
2526
2627 // Install Modules
2728 modal . useModules ( ) ;
@@ -30,6 +31,7 @@ class Modal extends Framework7Class {
3031 }
3132 onOpen ( ) {
3233 const modal = this ;
34+ modal . opened = true ;
3335 openedModals . push ( modal ) ;
3436 $ ( 'html' ) . addClass ( `with-modal-${ modal . type . toLowerCase ( ) } ` ) ;
3537 modal . $el . trigger ( `modal:open ${ modal . type . toLowerCase ( ) } :open` , modal ) ;
@@ -42,6 +44,7 @@ class Modal extends Framework7Class {
4244 }
4345 onClose ( ) {
4446 const modal = this ;
47+ modal . opened = false ;
4548 if ( ! modal . type || ! modal . $el ) return ;
4649 openedModals . splice ( openedModals . indexOf ( modal ) , 1 ) ;
4750 $ ( 'html' ) . removeClass ( `with-modal-${ modal . type . toLowerCase ( ) } ` ) ;
You can’t perform that action at this time.
0 commit comments