File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ import { Observable, throwError } from "rxjs";
1010const DialogInstances : NGSuiteDialogInstance [ ] = [ ] ;
1111const DialogRootMap = new Map < NGSuiteDialog , NGSuiteDialogRoot > ( ) ;
1212
13- @Injectable ( )
13+ @Injectable ( {
14+ providedIn : 'root' ,
15+ } )
1416export class NGSuiteDialog {
1517
1618 constructor ( ) {
@@ -74,15 +76,18 @@ export class NGSuiteDialog {
7476 instance . afterClosed . subscribe ( ( ) => {
7577 const index = DialogInstances . indexOf ( instance ) ;
7678 DialogInstances . splice ( index , 1 ) ;
79+
80+ const hasInstances = DialogInstances . length > 0 ;
81+ document . body . classList . toggle ( 'ngs-dialog-open' , hasInstances ) ;
7782 } ) ;
7883
7984 return instance ;
8085 }
8186
8287 closeAll ( ) {
8388 while ( DialogInstances . length ) {
84- const instance = DialogInstances . pop ( ) as NGSuiteDialogInstance ;
85- instance . close ( false ) ;
89+ const instance = DialogInstances . pop ( ) ;
90+ instance ? .close ( false ) ;
8691 }
8792 }
8893
Original file line number Diff line number Diff line change 3333 font-weight : 500 ;
3434 }
3535}
36+
37+ .ngs-dialog-open {
38+ overflow : clip !important ;
39+ }
You can’t perform that action at this time.
0 commit comments