FIX: Persist notifications in OS X (#14843)
We were previously triggering the close event, which in OSX meant that notifications would disappear from Notification Center.
This commit is contained in:
parent
5355990b2c
commit
e0ced68eec
|
@ -177,18 +177,10 @@ function onNotification(data, siteSettings, user) {
|
|||
tag: notificationTag,
|
||||
});
|
||||
|
||||
function clickEventHandler() {
|
||||
notification.onclick = () => {
|
||||
DiscourseURL.routeTo(data.post_url);
|
||||
// Cannot delay this until the page renders
|
||||
// due to trigger-based permissions
|
||||
window.focus();
|
||||
}
|
||||
|
||||
notification.addEventListener("click", clickEventHandler);
|
||||
later(() => {
|
||||
notification.close();
|
||||
notification.removeEventListener("click", clickEventHandler);
|
||||
}, 10 * 1000);
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue