lp1827942: prevent clicking outside an Angular modal from closing it
authorZavier Banks <zbanks@catalyte.io>
Tue, 17 Sep 2019 20:59:15 +0000 (20:59 +0000)
committerGalen Charlton <gmc@equinoxinitiative.org>
Fri, 27 Dec 2019 15:31:53 +0000 (10:31 -0500)
I added a new property to the "options" object inside the "open"
function, which resides in the dialog.component.ts. The static string
inside the backdrop property makes the form stay, even if the backdrop
is clicked.

Signed-off-by: Zavier Banks <zbanks@catalyte.io>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/share/dialog/dialog.component.ts

index cafbbcf..27b611f 100644 (file)
@@ -83,6 +83,7 @@ export class DialogComponent implements OnInit {
             this.finalize();
         }
 
+        options.backdrop="static";
         this.modalRef = this.modalService.open(this.dialogContent, options);
         DialogComponent.instances[this.identifier] = this;