Don't steal focus from privacy/terms links, but take them out of the tab order.
They should now be keyboard-reachable by searching for the text, but won't get in the way when tabbing to the submit button on various forms.
This commit is contained in:
parent
6ab842c472
commit
7c603e5e27
@ -51,12 +51,17 @@ Captcha.fixes =
|
|||||||
initMain: ->
|
initMain: ->
|
||||||
$.onExists d.body, '#recaptcha-anchor', (checkbox) ->
|
$.onExists d.body, '#recaptcha-anchor', (checkbox) ->
|
||||||
focus = ->
|
focus = ->
|
||||||
if d.hasFocus() and d.activeElement isnt checkbox
|
if d.hasFocus() and d.activeElement in [d.documentElement, d.body]
|
||||||
checkbox.focus()
|
checkbox.focus()
|
||||||
focus()
|
focus()
|
||||||
$.on window, 'focus', ->
|
$.on window, 'focus', ->
|
||||||
$.queueTask focus
|
$.queueTask focus
|
||||||
|
|
||||||
|
# Remove Privacy and Terms links from tab order.
|
||||||
|
for a in $$ '.rc-anchor-pt a'
|
||||||
|
a.tabIndex = -1
|
||||||
|
return
|
||||||
|
|
||||||
initPopup: ->
|
initPopup: ->
|
||||||
$.addStyle @css
|
$.addStyle @css
|
||||||
@fixImages()
|
@fixImages()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user