A platform for community discussion. Free, open, simple.
FIX: Persist notifications in OS X (#14843)
Penar Musaraje0ced68eec84
diff --git a/app/assets/javascripts/discourse/app/lib/desktop-notifications.js b/app/assets/javascripts/discourse/app/lib/desktop-notifications.jsindex 313473d545e..4fb5c91dc72 100644--- a/app/assets/javascripts/discourse/app/lib/desktop-notifications.js+++ b/app/assets/javascripts/discourse/app/lib/desktop-notifications.js@@ -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);+ };});}