FIX: Composer Processing/Uploading status not clearing on cancel and trash (#14050)

When the composer reply is cancelled and the draft is trashed,
the isUploading and isProcessing statuses were not being reset,
so when the composer was opened again the Uploading... or
Processing... message still showed even when the uploads had
been cancelled correctly.

The regular composer-upload mixin suffered the same problem
as the uppy one, where the Processing/Uploading message was not
reset when a reply was cancelled and the draft destroyed.
This commit is contained in:
Martin Brennan 2021-08-16 09:55:55 +10:00 committed by GitHub
parent 0e53769f71
commit f9e877dbff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -60,6 +60,8 @@ export default Mixin.create({
this.appEvents.off("composer:add-files", this._addFiles.bind(this)); this.appEvents.off("composer:add-files", this._addFiles.bind(this));
this._reset();
if (this._uppyInstance) { if (this._uppyInstance) {
this._uppyInstance.close(); this._uppyInstance.close();
this._uppyInstance = null; this._uppyInstance = null;

View File

@ -129,6 +129,13 @@ export default Mixin.create({
const $element = $(this.element); const $element = $(this.element);
this.setProperties({
uploadProgress: 0,
isUploading: false,
isProcessingUpload: false,
isCancellable: false,
});
$.blueimp.fileupload.prototype.processActions = this.uploadProcessorActions; $.blueimp.fileupload.prototype.processActions = this.uploadProcessorActions;
$element.fileupload({ $element.fileupload({