From 2bedeca62b69eab42ff8ed5e9e353a13e3fd4ab2 Mon Sep 17 00:00:00 2001 From: Shajahan Date: Thu, 26 Mar 2020 19:35:47 +0530 Subject: [PATCH] Fix[269] click event on links in notification message --- .gitignore | 4 ++++ addon/components/notification-message.js | 4 +++- addon/templates/components/notification-message.hbs | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c40a1b2a..96d6a0fe 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,7 @@ /.node_modules.ember-try/ /bower.json.ember-try /package.json.ember-try + + +# IDE / Code Editor configs +/.idea diff --git a/addon/components/notification-message.js b/addon/components/notification-message.js index 4d2c3837..585e87a7 100644 --- a/addon/components/notification-message.js +++ b/addon/components/notification-message.js @@ -63,7 +63,9 @@ export default Component.extend({ } }, - removeNotification() { + removeNotification(e) { + // clicking the notification close should not call the `onClick` callback defined on the notification message + e.stopPropagation(); this.get('notifications').removeNotification(this.get('notification')); }, diff --git a/addon/templates/components/notification-message.hbs b/addon/templates/components/notification-message.hbs index 87f007a6..8f741a08 100644 --- a/addon/templates/components/notification-message.hbs +++ b/addon/templates/components/notification-message.hbs @@ -8,13 +8,13 @@ {{/if}} -
+
{{#if notification.htmlContent}} {{{notification.message}}} {{else}} {{notification.message}} {{/if}} -
+