document.hasFocus() doesn't always work as intended in Chrome stable.
See crbug.com/64846
This commit is contained in:
parent
2c0946068e
commit
8e98e030c2
@ -96,7 +96,7 @@ Unread =
|
|||||||
Unread.openNotification post
|
Unread.openNotification post
|
||||||
return
|
return
|
||||||
openNotification: (post) ->
|
openNotification: (post) ->
|
||||||
return unless !document.hasFocus() and Header.areNotificationsEnabled
|
return unless Header.areNotificationsEnabled
|
||||||
name = if Conf['Anonymize']
|
name = if Conf['Anonymize']
|
||||||
'Anonymous'
|
'Anonymous'
|
||||||
else
|
else
|
||||||
|
|||||||
@ -113,7 +113,7 @@ QR =
|
|||||||
QR.captcha.nodes.input.focus()
|
QR.captcha.nodes.input.focus()
|
||||||
notice = new Notice 'warning', el
|
notice = new Notice 'warning', el
|
||||||
QR.notifications.push notice
|
QR.notifications.push notice
|
||||||
return unless !document.hasFocus() and Header.areNotificationsEnabled
|
return unless Header.areNotificationsEnabled
|
||||||
notif = new Notification 'Quick reply warning',
|
notif = new Notification 'Quick reply warning',
|
||||||
body: el.textContent
|
body: el.textContent
|
||||||
icon: Favicon.logo
|
icon: Favicon.logo
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user