Set send icon inactive after sending message

This commit is contained in:
Alan Friedman 2016-01-12 23:03:56 -05:00
parent fc8dae8217
commit d4010ff2c5

View File

@ -87,6 +87,7 @@ $(function() {
// if there is a non-empty message and a socket connection // if there is a non-empty message and a socket connection
if (message && connected) { if (message && connected) {
$inputMessage.val(''); $inputMessage.val('');
$('#send-message-btn').removeClass('active');
addChatMessage({ addChatMessage({
username: username, username: username,
message: message message: message
@ -256,7 +257,7 @@ $(function() {
} }
}); });
$inputMessage.on('input', function() { $inputMessage.on('input propertychange paste change', function() {
updateTyping(); updateTyping();
var message = $(this).val().trim(); var message = $(this).val().trim();
if (message.length) { if (message.length) {