Remove code that focused on first image of captcha.

This commit is contained in:
ccd0 2015-06-19 00:03:26 -07:00
parent c99f09275b
commit 551b11d447

View File

@ -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