Remove captcha destruction on Esc keybind, and restoration on QR unhide.
This commit is contained in:
parent
add0f3d3a2
commit
692e3d4dd3
@ -47,7 +47,6 @@ Keybinds =
|
||||
$('.close', notification).click()
|
||||
else if QR.nodes and !QR.nodes.el.hidden
|
||||
if Conf['Persistent QR']
|
||||
QR.captcha.destroy()
|
||||
QR.hide()
|
||||
else
|
||||
QR.close()
|
||||
|
||||
@ -137,11 +137,7 @@ QR =
|
||||
QR.nodes.el.contains(d.activeElement) or
|
||||
d.activeElement.nodeName is 'IFRAME' and /^https:\/\/www\.google\.com\/recaptcha\//.test(d.activeElement.src)
|
||||
)
|
||||
if focus
|
||||
QR.captcha.setup() if $.hasClass(QR.nodes.el, 'autohide') and !$.hasClass(QR.nodes.el, 'focus')
|
||||
$.addClass QR.nodes.el, 'focus'
|
||||
else
|
||||
$.rmClass QR.nodes.el, 'focus'
|
||||
$[if focus then 'addClass' else 'rmClass'] QR.nodes.el, 'focus'
|
||||
if chrome?
|
||||
# XXX Stop anomalous scrolling on space/tab in captcha iframe.
|
||||
if d.activeElement and QR.nodes.el.contains(d.activeElement) and d.activeElement.nodeName is 'IFRAME'
|
||||
@ -160,7 +156,6 @@ QR =
|
||||
$.addClass QR.nodes.el, 'autohide'
|
||||
QR.nodes.autohide.checked = true
|
||||
unhide: ->
|
||||
QR.captcha.setup() if $.hasClass(QR.nodes.el, 'autohide') and !$.hasClass(QR.nodes.el, 'focus')
|
||||
$.rmClass QR.nodes.el, 'autohide'
|
||||
QR.nodes.autohide.checked = false
|
||||
toggleHide: ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user