don't break when noscript blocks captcha
This commit is contained in:
parent
48f83502cd
commit
24c9809529
@ -2242,8 +2242,9 @@
|
||||
el = _ref2[_i];
|
||||
el.tabIndex = 1;
|
||||
}
|
||||
recaptcha = $('#recaptcha_response_field');
|
||||
return $.bind(recaptcha, 'keydown', Recaptcha.listener);
|
||||
if (recaptcha = $('#recaptcha_response_field')) {
|
||||
return $.bind(recaptcha, 'keydown', Recaptcha.listener);
|
||||
}
|
||||
},
|
||||
listener: function(e) {
|
||||
if (e.keyCode === 8 && this.value === '') {
|
||||
|
||||
@ -1701,8 +1701,8 @@ Recaptcha =
|
||||
#hack to tab from comment straight to recaptcha
|
||||
for el in $$ '#recaptcha_table a'
|
||||
el.tabIndex = 1
|
||||
recaptcha = $ '#recaptcha_response_field'
|
||||
$.bind recaptcha, 'keydown', Recaptcha.listener
|
||||
if recaptcha = $ '#recaptcha_response_field' #NoScript
|
||||
$.bind recaptcha, 'keydown', Recaptcha.listener
|
||||
listener: (e) ->
|
||||
if e.keyCode is 8 and @value is ''
|
||||
Recaptcha.reload()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user