fixed counting bug

This commit is contained in:
jeena 2013-09-09 17:24:32 +02:00
parent fb0dea5afc
commit e98b72c3ec

View file

@ -247,13 +247,13 @@ function(APICalls, HostApp) {
// re-inject the processed text into the div
this.highlighter.html(text);
var count = 256 - this.textarea.val().length + (this.mentions.length * 6);
var count = 256 - (this.textarea.val().length + (this.mentions.length * 6));
this.counter.html(count);
}
NewPost.prototype.send = function() {
var count = 256 - this.textarea.val().length + (this.mentions.length * 6);
var count = 256 - (this.textarea.val().length + (this.mentions.length * 6));
if(count >= 0 && count <= 256) {
this.sendNewMessage();
return true;