diff --git a/src/Monitoring/Unread.coffee b/src/Monitoring/Unread.coffee index 0b779c80b..0e67a138e 100644 --- a/src/Monitoring/Unread.coffee +++ b/src/Monitoring/Unread.coffee @@ -136,7 +136,8 @@ Unread = icon: Favicon.logo notif.onclick = -> Header.scrollToIfNeeded post.nodes.root, true - window.focus() + # XXX https://github.com/derjanb/tampermonkey/issues/253 + $.global -> window.focus() notif.onshow = -> setTimeout -> notif.close() diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 15290fa49..a13b6adda 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -215,7 +215,8 @@ QR = notif = new Notification el.textContent, body: el.textContent icon: Favicon.logo - notif.onclick = -> window.focus() + # XXX https://github.com/derjanb/tampermonkey/issues/253 + notif.onclick = -> $.global -> window.focus() if $.engine isnt 'gecko' # Firefox automatically closes notifications # so we can't control the onclose properly.