From 9c2a7f0fd157b44e9e1c1ef2a2985dc4fb090d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 21 Jul 2014 11:14:01 +0200 Subject: [PATCH] BUGFIX: cancelling an upload should hide cancel button --- app/assets/javascripts/discourse/views/composer.js.es6 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/views/composer.js.es6 b/app/assets/javascripts/discourse/views/composer.js.es6 index 280690f30..f962efcfa 100644 --- a/app/assets/javascripts/discourse/views/composer.js.es6 +++ b/app/assets/javascripts/discourse/views/composer.js.es6 @@ -290,7 +290,8 @@ var ComposerView = Discourse.View.extend(Ember.Evented, { // bind on the click event on the cancel link $('#cancel-file-upload').on('click', function() { // cancel the upload - // NOTE: this will trigger a 'fileuploadfail' event with status = 0 + self.set('isUploading', false); + // NOTE: this might trigger a 'fileuploadfail' event with status = 0 if (jqXHR) jqXHR.abort(); // unbind $(this).off('click');