From c60b8ef17e6f2862e03a5d9082ee2f86d92bd546 Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Wed, 6 May 2015 21:52:49 +0500 Subject: [PATCH] fix of wrong binding of functions on keyup event --- js/tmobile.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/tmobile.js b/js/tmobile.js index a5944c44..fd8ff2e7 100644 --- a/js/tmobile.js +++ b/js/tmobile.js @@ -24,8 +24,11 @@ function initializeTwister( redirectNetwork, redirectLogin, cbFunc, cbArg ) { $.mobile.silentScroll(0); }); // reply text counter both newmsg and dmchat - var $replyText = $( ".post-area-new textarea" ); - $replyText.off('input keyup').on('keyup', replyTextInput, function() { replyTextUpdateRemaining(this); }); + $('.post-area-new textarea') + .off('input keyup') + .on('keyup', replyTextInput) + .on('keyup', function() { replyTextUpdateRemaining(this); }) + ; handlersInstalled = true; }