From 8bad3c0eb5a1abef8d3ecc532c87f2704ecb5902 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 25 Apr 2016 13:35:30 -0400 Subject: [PATCH] FIX: Cmd/Shift clicking links in the header was broken --- app/assets/javascripts/discourse/widgets/link.js.es6 | 1 + .../javascripts/discourse/widgets/notification-item.js.es6 | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/assets/javascripts/discourse/widgets/link.js.es6 b/app/assets/javascripts/discourse/widgets/link.js.es6 index 49ccb07a56c..587964b23d7 100644 --- a/app/assets/javascripts/discourse/widgets/link.js.es6 +++ b/app/assets/javascripts/discourse/widgets/link.js.es6 @@ -70,6 +70,7 @@ export default createWidget('link', { }, click(e) { + if (e.isDefaultPrevented() || e.shiftKey || e.metaKey || e.ctrlKey) { return; } e.preventDefault(); if (this.attrs.action) { diff --git a/app/assets/javascripts/discourse/widgets/notification-item.js.es6 b/app/assets/javascripts/discourse/widgets/notification-item.js.es6 index 108e757b888..a5563d81fe3 100644 --- a/app/assets/javascripts/discourse/widgets/notification-item.js.es6 +++ b/app/assets/javascripts/discourse/widgets/notification-item.js.es6 @@ -96,7 +96,9 @@ createWidget('notification-item', { }, click(e) { + if (e.isDefaultPrevented() || e.shiftKey || e.metaKey || e.ctrlKey) { return; } e.preventDefault(); + this.attrs.set('read', true); const id = this.attrs.id; Discourse.setTransientHeader("Discourse-Clear-Notifications", id);