go back to nuking id

disable auto-focus instead of jerking the user's view on every submit.
This commit is contained in:
James Campos 2010-10-11 04:08:44 -07:00
parent 3fe3be3456
commit df8c584caa
2 changed files with 11 additions and 5 deletions

View File

@ -505,10 +505,7 @@ quickReply = (e) ->
}
clone.appendChild(input)
qr.appendChild(clone)
inBefore(document.body.firstChild, qr)
#XXX - put qr first in body, so `Recaptcha.reload()`,
# when using document.getElementById, sees and focuses this
# instead of the original.
document.body.appendChild(qr)
if e
e.preventDefault()
@ -746,6 +743,12 @@ if getConfig('Quick Reply')
quote.addEventListener('click', quickReply, true)
)
#hack - nuke id so it doesn't grab focus when reloading
console.log 'wat'
console.log $('#recaptcha_response_field')
$('#recaptcha_response_field').id = ''
#$('form[name=post] input[name=recaptcha_response_field]').id = ''
if getConfig('Quick Report')
callbacks.push((root) ->

View File

@ -547,7 +547,7 @@
clone.appendChild(input);
}
qr.appendChild(clone);
inBefore(document.body.firstChild, qr);
document.body.appendChild(qr);
}
if (e) {
e.preventDefault();
@ -825,6 +825,9 @@
}
return _result;
});
console.log('wat');
console.log($('#recaptcha_response_field'));
$('#recaptcha_response_field').id = '';
}
if (getConfig('Quick Report')) {
callbacks.push(function(root) {