mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 03:48:23 +00:00
BUGFIX: cancelling an upload should hide cancel button
This commit is contained in:
parent
499f18a099
commit
9c2a7f0fd1
@ -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');
|
||||
|
Loading…
x
Reference in New Issue
Block a user