From ce54f06e42059deb6754939a4e48aad3713f9e68 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Tue, 28 Jul 2015 18:51:53 +0930 Subject: [PATCH] Don't close notifications dropdown if opening in a new tab --- js/forum/src/components/NotificationsDropdown.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/forum/src/components/NotificationsDropdown.js b/js/forum/src/components/NotificationsDropdown.js index b75fa4289..d009e7fe8 100644 --- a/js/forum/src/components/NotificationsDropdown.js +++ b/js/forum/src/components/NotificationsDropdown.js @@ -27,7 +27,7 @@ export default class NotificationsDropdown extends Component { {unread || icon('bell')} {app.trans('core.notifications')} -
+
{this.showing ? NotificationList.component() : ''}
@@ -41,4 +41,10 @@ export default class NotificationsDropdown extends Component { this.showing = true; } } + + menuClick(e) { + // Don't close the notifications dropdown if the user is opening a link in a + // new tab or window. + if (e.shiftKey || e.metaKey || e.ctrlKey || e.which === 2) e.stopPropagation(); + } }