A bit rude of the QR to remove focus when the focus wasn't on the QR.

This commit is contained in:
ccd0 2017-02-06 21:21:37 -08:00
parent a0bfe1b1f4
commit 8191b4c859

View File

@ -146,7 +146,7 @@ QR =
return
QR.nodes.el.hidden = true
QR.cleanNotifications()
d.activeElement.blur()
QR.blur()
$.rmClass QR.nodes.el, 'dump'
$.addClass QR.shortcut, 'disabled'
new QR.post true
@ -168,7 +168,7 @@ QR =
getComputedStyle(el).visibility isnt 'hidden' and el.getBoundingClientRect().bottom > 0
hide: ->
d.activeElement.blur()
QR.blur()
$.addClass QR.nodes.el, 'autohide'
QR.nodes.autohide.checked = true
@ -182,6 +182,9 @@ QR =
else
QR.unhide()
blur: ->
d.activeElement.blur() if QR.nodes.el.contains(d.activeElement)
toggleSJIS: (e) ->
e.preventDefault()
Conf['sjisPreview'] = !Conf['sjisPreview']