From e98b72c3ec3ac6ad8fbc5ce7d4cda069c23e418c Mon Sep 17 00:00:00 2001 From: jeena Date: Mon, 9 Sep 2013 17:24:32 +0200 Subject: [PATCH] fixed counting bug --- WebKit/scripts/controller/NewPost.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebKit/scripts/controller/NewPost.js b/WebKit/scripts/controller/NewPost.js index 3d7d085..1b5b74e 100644 --- a/WebKit/scripts/controller/NewPost.js +++ b/WebKit/scripts/controller/NewPost.js @@ -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;