Change-Id: I835a83bd9554174e84f0d161f38e89328be88311
$('#ui-mySend').on('click', function (event) {
event.stopPropagation();
var message = $('#text').val();
+ if (message.length === 0) {
+ return;
+ }
$('#text').val('');
self.ui.disableSendButton();
app.sendMessage(message);
},
disableSendButton: function Ui_disableSendButton() {
- setTimeout( function() {
- $('#ui-mySend')
- .css({'pointer-events': 'none', 'color': '#bbb'})
- .addClass('ui-disabled');
- },
- 0
- );
+ $('#ui-mySend')
+ .css({'pointer-events': 'none', 'color': '#bbb'})
+ .addClass('ui-disabled');
},
checkSendButtonState: function Ui_checkSendButtonState() {