don't directly set style.visibility
This commit is contained in:
parent
4a0c13a8c1
commit
7525b505aa
@ -444,7 +444,7 @@ submit = (e) ->
|
|||||||
alert 'You forgot to type in the verification.'
|
alert 'You forgot to type in the verification.'
|
||||||
recaptcha.focus()
|
recaptcha.focus()
|
||||||
else
|
else
|
||||||
@style.visibility = 'collapse'
|
$('#qr input[title=autohide]:not(:checked)')?.click()
|
||||||
|
|
||||||
|
|
||||||
autohide = ->
|
autohide = ->
|
||||||
@ -503,7 +503,10 @@ quickReply = (e) ->
|
|||||||
}
|
}
|
||||||
clone.appendChild(input)
|
clone.appendChild(input)
|
||||||
qr.appendChild(clone)
|
qr.appendChild(clone)
|
||||||
document.body.appendChild(qr)
|
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.
|
||||||
|
|
||||||
if e
|
if e
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
@ -739,10 +742,6 @@ if getConfig('Quick Reply')
|
|||||||
quote.addEventListener('click', quickReply, true)
|
quote.addEventListener('click', quickReply, true)
|
||||||
)
|
)
|
||||||
|
|
||||||
#hack - nuke the original recaptcha's id so it doesn't grab focus
|
|
||||||
# when reloading
|
|
||||||
$('form[name=post] input[name=recaptcha_response_field]').id = ''
|
|
||||||
|
|
||||||
|
|
||||||
if getConfig('Quick Report')
|
if getConfig('Quick Report')
|
||||||
callbacks.push((root) ->
|
callbacks.push((root) ->
|
||||||
|
|||||||
@ -470,7 +470,7 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
submit = function(e) {
|
submit = function(e) {
|
||||||
var recaptcha, span;
|
var _ref2, _ref3, recaptcha, span;
|
||||||
if (span = this.nextSibling) {
|
if (span = this.nextSibling) {
|
||||||
remove(span);
|
remove(span);
|
||||||
}
|
}
|
||||||
@ -485,7 +485,7 @@
|
|||||||
alert('You forgot to type in the verification.');
|
alert('You forgot to type in the verification.');
|
||||||
return recaptcha.focus();
|
return recaptcha.focus();
|
||||||
} else {
|
} else {
|
||||||
return (this.style.visibility = 'collapse');
|
return (typeof (_ref3 = ((_ref2 = $('#qr input[title=autohide]:not(:checked)')))) === "undefined" || _ref3 === null) ? undefined : _ref3.click();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
autohide = function() {
|
autohide = function() {
|
||||||
@ -545,7 +545,7 @@
|
|||||||
clone.appendChild(input);
|
clone.appendChild(input);
|
||||||
}
|
}
|
||||||
qr.appendChild(clone);
|
qr.appendChild(clone);
|
||||||
document.body.appendChild(qr);
|
inBefore(document.body.firstChild, qr);
|
||||||
}
|
}
|
||||||
if (e) {
|
if (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@ -822,7 +822,6 @@
|
|||||||
}
|
}
|
||||||
return _result;
|
return _result;
|
||||||
});
|
});
|
||||||
$('form[name=post] input[name=recaptcha_response_field]').id = '';
|
|
||||||
}
|
}
|
||||||
if (getConfig('Quick Report')) {
|
if (getConfig('Quick Report')) {
|
||||||
callbacks.push(function(root) {
|
callbacks.push(function(root) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user