From 97a11034d11fa6c512eff692e5d230f84f5ad5ed Mon Sep 17 00:00:00 2001 From: ccd0 Date: Thu, 5 Nov 2015 10:55:13 -0800 Subject: [PATCH] Work around new Recaptcha bug interfering with focusing on submit button. --- src/Posting/Captcha.v2.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Posting/Captcha.v2.coffee b/src/Posting/Captcha.v2.coffee index 059f7080c..3d42d57ef 100644 --- a/src/Posting/Captcha.v2.coffee +++ b/src/Posting/Captcha.v2.coffee @@ -145,6 +145,10 @@ Captcha.v2 = QR.nodes.el.style.bottom = '0px' iframe.focus() if @shouldFocus @shouldFocus = false + # XXX Stop Recaptcha from changing focus from iframe -> body -> iframe on submit. + $.global -> + f = document.querySelector('#qr iframe') + f.focus = f.blur = -> setupTextArea: (textarea) -> $.one textarea, 'input', => @save true