Fix unwanted focusing on the submit button if you focus on the comment field too soon after entering the captcha.

This commit is contained in:
ccd0 2015-04-13 20:56:43 -07:00
parent 3d638f71f2
commit e250bd1091

View File

@ -155,11 +155,12 @@ Captcha.v2 =
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
@timeouts.destroy ?= setTimeout @destroy.bind(@), 3 * $.SECOND
QR.nodes.status.focus()
QR.nodes.status.focus() if focus
QR.submit() if Conf['Post on Captcha Completion'] and !QR.cooldown.auto