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.
This commit is contained in:
Mayhem 2013-08-17 22:54:51 +02:00
parent 5742405f67
commit 25f77a12da

View File

@ -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