fix: if click send and before message is sended click send again then message will be duplicated

This commit is contained in:
Silron88 2015-08-19 02:22:39 +03:00 committed by Fedor A. Fetisov
parent ad186da482
commit 8b32bebdc2

View File

@ -84,6 +84,9 @@
* Get, check and post message
*/
postMessage: function() {
if (this.isDisabledInput()){
return;
}
var msg = this.ui.message.val();
// TODO: Think about it
// Cut multiple line breaks
@ -129,6 +132,13 @@
},
/**
* Check is disabled message input area
*/
isDisabledInput: function() {
return this.ui.message.attr('disabled') == 'disabled';
},
/**svn
* Clear message input area
*/
clearInput: function() {