FIX: Cmd/Shift clicking links in the header was broken
This commit is contained in:
parent
16c44971d9
commit
8bad3c0eb5
|
@ -70,6 +70,7 @@ export default createWidget('link', {
|
||||||
},
|
},
|
||||||
|
|
||||||
click(e) {
|
click(e) {
|
||||||
|
if (e.isDefaultPrevented() || e.shiftKey || e.metaKey || e.ctrlKey) { return; }
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
if (this.attrs.action) {
|
if (this.attrs.action) {
|
||||||
|
|
|
@ -96,7 +96,9 @@ createWidget('notification-item', {
|
||||||
},
|
},
|
||||||
|
|
||||||
click(e) {
|
click(e) {
|
||||||
|
if (e.isDefaultPrevented() || e.shiftKey || e.metaKey || e.ctrlKey) { return; }
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
this.attrs.set('read', true);
|
this.attrs.set('read', true);
|
||||||
const id = this.attrs.id;
|
const id = this.attrs.id;
|
||||||
Discourse.setTransientHeader("Discourse-Clear-Notifications", id);
|
Discourse.setTransientHeader("Discourse-Clear-Notifications", id);
|
||||||
|
|
Loading…
Reference in New Issue