Skip to content

Commit

Permalink
Merge pull request #5276 from dodona-edu/fix/ctrl-click
Browse files Browse the repository at this point in the history
Fix ctrl click for notifications
  • Loading branch information
jorg-vr authored Jan 9, 2024
2 parents 320ceaf + 9ea0a18 commit bc3cb94
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/assets/javascripts/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ export class Notification {
// We only want to install the click handler for the full element on the small notification view.
if (installClickHandler) {
this.element.addEventListener("click", event => {
// Use default browser behavior if the user clicked on the link itself.
if (event.target instanceof HTMLAnchorElement) return;

this.visit();
event.stopPropagation();
});
Expand Down

0 comments on commit bc3cb94

Please sign in to comment.