FIX: Cmd/Shift clicking links in the header was broken

This commit is contained in:
Robin Ward 2016-04-25 13:35:30 -04:00
parent 16c44971d9
commit 8bad3c0eb5
No known key found for this signature in database
GPG Key ID: 0E091E2B4ED1B83D
2 changed files with 3 additions and 0 deletions

View File

@ -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) {

View File

@ -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);