derpy, prevent calling QR.hasContent twice

This commit is contained in:
James Campos 2011-09-03 12:48:46 -07:00
parent 5ffcb63fb3
commit 56aa4f92f1
2 changed files with 4 additions and 4 deletions

View File

@ -1391,9 +1391,8 @@
return; return;
} }
QR.captchaPush(this); QR.captchaPush(this);
if (!QR.hasContent()) { e.preventDefault();
return e.preventDefault(); return e.submit();
}
}, },
quote: function(e) { quote: function(e) {
var i, ss, ta, text, v; var i, ss, ta, text, v;

View File

@ -1094,7 +1094,8 @@ QR =
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
QR.captchaPush @ QR.captchaPush @
e.preventDefault() unless QR.hasContent() e.preventDefault()
e.submit() #derpy, but prevents calling QR.hasContent twice
quote: (e) -> quote: (e) ->
e.preventDefault() e.preventDefault()
text = ">>#{@textContent}\n" text = ">>#{@textContent}\n"