Remove code that focused on first image of captcha.
This commit is contained in:
parent
c99f09275b
commit
551b11d447
@ -29,21 +29,10 @@ Captcha.fixes =
|
|||||||
$.on d, 'keydown', @keybinds.bind(@)
|
$.on d, 'keydown', @keybinds.bind(@)
|
||||||
|
|
||||||
fixImages: ->
|
fixImages: ->
|
||||||
return unless (@images = $$ '.rc-imageselect-target > div').length
|
@images = $$ '.rc-imageselect-target > div'
|
||||||
focus = @images[0].tabIndex isnt 0
|
|
||||||
for img in @images
|
for img in @images
|
||||||
img.tabIndex = 0
|
img.tabIndex = 0
|
||||||
if focus
|
return
|
||||||
$.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
|
|
||||||
, ->
|
|
||||||
|
|
||||||
keybinds: (e) ->
|
keybinds: (e) ->
|
||||||
return unless @images and doc.contains(@images[0]) and d.activeElement
|
return unless @images and doc.contains(@images[0]) and d.activeElement
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user