Skip to content

Commit

Permalink
Fix notification focus on Chrome (#9467)
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyDaemonic authored and alecpl committed Jun 1, 2024
1 parent 43aaaa5 commit e2900cf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugins/newmail_notifier/newmail_notifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,14 @@ function newmail_notifier_desktop(body, disabled_callback)
tag: "newmail_notifier",
icon: icon
});
popup.onclick = function() { this.close(); };

popup.onclick = function() {
if (window.parent) {
window.parent.focus();
}
this.close();
};

setTimeout(function() { popup.close(); }, timeout * 1000);
};

Expand Down

0 comments on commit e2900cf

Please sign in to comment.