From df85712763e494a2528771fd006fc661aad5c969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Verg=C3=A9?= Date: Thu, 23 Jun 2016 13:51:28 +0200 Subject: [PATCH] fix(modal): don't hide on out click if backdrop === 'static' (#629) Fixes: #574 --- components/modal/modal.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/modal/modal.component.ts b/components/modal/modal.component.ts index f0c58866b6..7c4638b00e 100644 --- a/components/modal/modal.component.ts +++ b/components/modal/modal.component.ts @@ -76,7 +76,8 @@ export class ModalDirective implements AfterViewInit, OnDestroy { @HostListener('click', ['$event']) protected onClick(event:any):void { - if (event.target === this.element.nativeElement) { + if (this.config.backdrop !== 'static' && + event.target === this.element.nativeElement) { this.hide(event); } }