From 47320fbbc5fd369aaa4b128b6cad7dcfce6cbdcd Mon Sep 17 00:00:00 2001 From: lilia Date: Fri, 15 Apr 2016 14:39:02 -0700 Subject: [PATCH] Fix file input bug introduced in 28c602a Fix bug where clicking the attachment button to select a file would immediately send any text already entered into the message input. // FREEBIE --- js/views/file_input_view.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/views/file_input_view.js b/js/views/file_input_view.js index b8a01435..b0662f07 100644 --- a/js/views/file_input_view.js +++ b/js/views/file_input_view.js @@ -38,7 +38,8 @@ 'dragleave': 'hideArea' }, - open: function() { + open: function(e) { + e.preventDefault(); // hack if (this.window && this.window.chrome && this.window.chrome.fileSystem) { this.window.chrome.fileSystem.chooseEntry({type: 'openFile'}, function(entry) {