From 5445f3b6646a0768e1afe5b7731fe46fea81a523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KLINGLER?= Date: Wed, 11 Oct 2017 08:39:57 +0200 Subject: [PATCH] fix(SwalDirective): stop propagation of click event to parent handlers (#28) This fixes this case: ``` Bar ``` Where clicking on the `a` link triggered the swal but also triggered the `tr` *routerLink*. --- src/swal.directive.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/swal.directive.ts b/src/swal.directive.ts index ab9b900..b688fcc 100644 --- a/src/swal.directive.ts +++ b/src/swal.directive.ts @@ -33,6 +33,7 @@ export class SwalDirective { public onHostClicked(event: MouseEvent): void { event.preventDefault(); event.stopImmediatePropagation(); + event.stopPropagation(); const options = { ...this.defaultSwalOptions, ...this.modalOptions };