Fix bug where submit button was still getting unwanted focus under certain conditions.

This commit is contained in:
ccd0 2015-05-14 01:02:33 -07:00
parent 6cf66ed43b
commit 93918ae575

View File

@ -146,14 +146,15 @@ Captcha.v2 =
$.set 'captchas', @captchas
@count()
focus = d.activeElement?.nodeName is 'IFRAME' and d.activeElement.src?[...38] is 'https://www.google.com/recaptcha/api2/'
if @needed()
if QR.cooldown.auto or Conf['Post on Captcha Completion']
@shouldFocus = true
else
QR.nodes.status.focus()
if focus
if QR.cooldown.auto or Conf['Post on Captcha Completion']
@shouldFocus = true
else
QR.nodes.status.focus()
@reload()
else
focus = d.activeElement?.nodeName is 'IFRAME' and d.activeElement.src?[...38] is 'https://www.google.com/recaptcha/api2/'
if pasted
@destroy()
else