More consistent checkbox focusing.
This commit is contained in:
parent
a7bbdfcdf7
commit
4e49ed7c1c
@ -26,10 +26,13 @@ Captcha.v2 =
|
||||
$.queueTask => @save false
|
||||
|
||||
initFrame: ->
|
||||
$.on window, 'focus', ->
|
||||
$.queueTask ->
|
||||
return unless d.hasFocus() and (checkbox = $.id 'recaptcha-anchor')
|
||||
checkbox.focus() unless d.activeElement is checkbox
|
||||
$.onExists d.body, '#recaptcha-anchor', true, (checkbox) ->
|
||||
focus = ->
|
||||
if d.hasFocus() and d.activeElement isnt checkbox
|
||||
checkbox.focus()
|
||||
focus()
|
||||
$.on window, 'focus', ->
|
||||
$.queueTask focus
|
||||
|
||||
shouldFocus: false
|
||||
timeouts: {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user