From c59bca05bb37395dbbc05340f795f1ad6fd906c5 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 6 Jun 2018 17:26:58 -0400 Subject: [PATCH] fixes on modal --- src/angular/components/modal.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/angular/components/modal.component.ts b/src/angular/components/modal.component.ts index a56d84fd61..d63c78af7f 100644 --- a/src/angular/components/modal.component.ts +++ b/src/angular/components/modal.component.ts @@ -22,7 +22,7 @@ export class ModalComponent implements OnDestroy { parentContainer: ViewContainerRef = null; fade: boolean = true; - constructor(private componentFactoryResolver: ComponentFactoryResolver) { } + constructor(protected componentFactoryResolver: ComponentFactoryResolver) { } ngOnDestroy() { document.body.classList.remove('modal-open'); @@ -46,7 +46,8 @@ export class ModalComponent implements OnDestroy { e.stopPropagation(); }); - for (const closeElement of document.querySelectorAll('.modal, .modal *[data-dismiss="modal"]')) { + const modals = Array.from(document.querySelectorAll('.modal, .modal *[data-dismiss="modal"]')); + for (const closeElement of modals) { closeElement.addEventListener('click', (event) => { this.close(); });