From 551b11d4470370b2e31ec1383794a7743665db75 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Fri, 19 Jun 2015 00:03:26 -0700 Subject: [PATCH] Remove code that focused on first image of captcha. --- src/Posting/Captcha.fixes.coffee | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/Posting/Captcha.fixes.coffee b/src/Posting/Captcha.fixes.coffee index e30ea4246..ae81a6fd6 100644 --- a/src/Posting/Captcha.fixes.coffee +++ b/src/Posting/Captcha.fixes.coffee @@ -29,21 +29,10 @@ Captcha.fixes = $.on d, 'keydown', @keybinds.bind(@) fixImages: -> - return unless (@images = $$ '.rc-imageselect-target > div').length - focus = @images[0].tabIndex isnt 0 + @images = $$ '.rc-imageselect-target > div' for img in @images img.tabIndex = 0 - if focus - $.queueTask => @focusImage() - - focusImage: -> - # XXX Image is not focusable at first in Firefox; to be refactored when I figure out why. - img = @images[0] - $.asap -> - return true unless doc.contains img - img.focus() - d.activeElement is img - , -> + return keybinds: (e) -> return unless @images and doc.contains(@images[0]) and d.activeElement