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