fix for auto posting

This commit is contained in:
James Campos 2011-09-02 22:45:19 -07:00
parent c35f959f42
commit a43711ba27
2 changed files with 4 additions and 6 deletions

View File

@ -1365,11 +1365,10 @@
if (!(e.keyCode === 13 && this.value)) { if (!(e.keyCode === 13 && this.value)) {
return; return;
} }
if (QR.hasContent()) { QR.captchaPush(this);
return; if (!QR.hasContent()) {
return e.preventDefault();
} }
e.preventDefault();
return QR.captchaPush(this);
}, },
quote: function(e) { quote: function(e) {
var i, ss, ta, text, v; var i, ss, ta, text, v;

View File

@ -1070,9 +1070,8 @@ QR =
$('textarea', QR.el).value or $('[type=file]', QR.el).files.length $('textarea', QR.el).value or $('[type=file]', QR.el).files.length
keydown: (e) -> keydown: (e) ->
return unless e.keyCode is 13 and @value #enter, captcha filled return unless e.keyCode is 13 and @value #enter, captcha filled
return if QR.hasContent()
e.preventDefault()
QR.captchaPush @ QR.captchaPush @
e.preventDefault() unless QR.hasContent()
quote: (e) -> quote: (e) ->
e.preventDefault() e.preventDefault()
text = ">>#{@textContent}\n" text = ">>#{@textContent}\n"