From 614d3a3e400c9b9fd84a27e78eb05925442bcab9 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 20 Jun 2015 20:42:37 -0700 Subject: [PATCH] Use refresh button as position when nothing has focus. --- src/Posting/Captcha.fixes.coffee | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/Posting/Captcha.fixes.coffee b/src/Posting/Captcha.fixes.coffee index fac54a480..43563a97c 100644 --- a/src/Posting/Captcha.fixes.coffee +++ b/src/Posting/Captcha.fixes.coffee @@ -80,18 +80,13 @@ Captcha.fixes = e.preventDefault() if n is 0 keybinds: (e) -> - return unless @images and doc.contains(@images[0]) and d.activeElement + return unless @images and doc.contains(@images[0]) + reload = $ '#recaptcha-reload-button, .fbc-button-reload' verify = $ '#recaptcha-verify-button, .fbc-button-verify > input' - x = @images.indexOf d.activeElement if x < 0 - if d.activeElement is verify - x = 11 - else if $('.rc-controls, .fbc-buttons').contains d.activeElement - x = 9 - else - return + x = if d.activeElement is verify then 11 else 9 if !@noscript and e.keyCode is 32 and x < 9 # space on image @images[x].click()