Start desktop notification closing timeout only after they appeared.
This commit is contained in:
parent
386888e4d1
commit
5c36d646a5
@ -104,6 +104,7 @@ Unread =
|
|||||||
notif.onclick = ->
|
notif.onclick = ->
|
||||||
Header.scrollToPost post.nodes.root
|
Header.scrollToPost post.nodes.root
|
||||||
window.focus()
|
window.focus()
|
||||||
|
notif.onshow = ->
|
||||||
setTimeout ->
|
setTimeout ->
|
||||||
notif.close()
|
notif.close()
|
||||||
, 7 * $.SECOND
|
, 7 * $.SECOND
|
||||||
|
|||||||
@ -122,6 +122,7 @@ QR =
|
|||||||
# Firefox automatically closes notifications
|
# Firefox automatically closes notifications
|
||||||
# so we can't control the onclose properly.
|
# so we can't control the onclose properly.
|
||||||
notif.onclose = -> notice.close()
|
notif.onclose = -> notice.close()
|
||||||
|
notif.onshow = ->
|
||||||
setTimeout ->
|
setTimeout ->
|
||||||
notif.onclose = null
|
notif.onclose = null
|
||||||
notif.close()
|
notif.close()
|
||||||
@ -1108,6 +1109,7 @@ QR =
|
|||||||
QR.open()
|
QR.open()
|
||||||
QR.captcha.nodes.input.focus()
|
QR.captcha.nodes.input.focus()
|
||||||
window.focus()
|
window.focus()
|
||||||
|
notif.onshow = ->
|
||||||
setTimeout ->
|
setTimeout ->
|
||||||
notif.close()
|
notif.close()
|
||||||
, 7 * $.SECOND
|
, 7 * $.SECOND
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user