diff --git a/4chan_x.coffee b/4chan_x.coffee index 2536ae377..a98e619c4 100644 --- a/4chan_x.coffee +++ b/4chan_x.coffee @@ -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) -> diff --git a/4chan_x.js b/4chan_x.js index 3ac900db0..0d43dd052 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -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) {