From: Piotr Dabrowski Date: Fri, 18 Oct 2013 14:18:49 +0000 (+0200) Subject: [BluetoothChat] updated BluetoothChat sources X-Git-Tag: 2.2.1_release X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d0b86f54b6361bffe1892038cfb876c3e094349;hp=23fe77c7579cc6b9c8594ca43b198f9749c19276;p=samples%2Fweb%2FBluetoothChat.git [BluetoothChat] updated BluetoothChat sources Change-Id: I835a83bd9554174e84f0d161f38e89328be88311 --- diff --git a/js/app.ui.events.js b/js/app.ui.events.js index f9ae99f..781c779 100644 --- a/js/app.ui.events.js +++ b/js/app.ui.events.js @@ -166,6 +166,9 @@ function UiEvents(parent) { $('#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); diff --git a/js/app.ui.js b/js/app.ui.js index 9bd9d99..9e4f7cc 100644 --- a/js/app.ui.js +++ b/js/app.ui.js @@ -192,13 +192,9 @@ function Ui(callback) { }, 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() {