Feature Request: Send text instead of files

This commit is contained in:
Robin Linus 2016-01-02 14:23:51 +01:00
parent ce61dc7c60
commit 0e008a5f31
9 changed files with 288 additions and 111 deletions

View file

@ -23,13 +23,14 @@ Chat.FileButtonBehaviorImpl = {
var files = this.fileInput.files;
this.notifyFilesSelection(files);
}.bind(this);
},
listeners: {
'tap': '_openDialog'
},
_openDialog: function() {
this.fileInput.value = null;
this.fileInput.click();
this.addEventListener('click', function(e) {
var button = e.which || e.button;
if (button !== 1) {
return;
}
this.fileInput.value = null;
this.fileInput.click();
}.bind(this), false);
}
};
Chat.FileButtonBehavior = [Chat.FileButtonBehaviorImpl, Chat.FileSelectionBehavior];