From 25f77a12da16bdb29c8f57bc48e178db79259ce5 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Sat, 17 Aug 2013 22:54:51 +0200 Subject: [PATCH] Don't handle a notification's onclose on Firefox. Mozilla hates devs and won't let us distinguish an automatic closing to a user's closing action. --- src/Posting/QR.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index c54662a00..e9c1e2924 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -118,11 +118,15 @@ QR = body: el.textContent icon: Favicon.logo notif.onclick = -> window.focus() + <% if (type === 'crx') { %> + # Firefox automatically closes notifications + # so we can't control the onclose properly. notif.onclose = -> notice.close() setTimeout -> notif.onclose = null notif.close() , 5 * $.SECOND + <% } %> notifications: [] cleanNotifications: -> for notification in QR.notifications