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:
parent
5742405f67
commit
25f77a12da
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user