Don't abort the QR request if the upload if finished.
If you try to close the QR while uploading, the same logic will apply and the QR won't close.
This commit is contained in:
parent
28a472adec
commit
ee1efc14fb
@ -5719,9 +5719,14 @@
|
||||
},
|
||||
close: function() {
|
||||
var i, _i, _len, _ref;
|
||||
if (QR.req) {
|
||||
if (!QR.req.isUploadFinished) {
|
||||
QR.abort();
|
||||
}
|
||||
return;
|
||||
}
|
||||
QR.nodes.el.hidden = true;
|
||||
QR.cleanNotifications();
|
||||
QR.abort();
|
||||
d.activeElement.blur();
|
||||
$.rmClass(QR.nodes.el, 'dump');
|
||||
_ref = QR.replies;
|
||||
@ -6519,7 +6524,9 @@
|
||||
e.preventDefault();
|
||||
}
|
||||
if (QR.req) {
|
||||
QR.abort();
|
||||
if (!QR.req.isUploadFinished) {
|
||||
QR.abort();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (QR.cooldown.seconds) {
|
||||
@ -6607,6 +6614,7 @@
|
||||
form: $.formData(post),
|
||||
upCallbacks: {
|
||||
onload: function() {
|
||||
QR.req.isUploadFinished = true;
|
||||
QR.req.progress = '...';
|
||||
return QR.status();
|
||||
},
|
||||
|
||||
@ -62,9 +62,11 @@ QR =
|
||||
message: 'Quick Reply dialog creation crashed.'
|
||||
error: err
|
||||
close: ->
|
||||
if QR.req
|
||||
QR.abort() unless QR.req.isUploadFinished
|
||||
return
|
||||
QR.nodes.el.hidden = true
|
||||
QR.cleanNotifications()
|
||||
QR.abort()
|
||||
d.activeElement.blur()
|
||||
$.rmClass QR.nodes.el, 'dump'
|
||||
for i in QR.replies
|
||||
@ -738,7 +740,7 @@ QR =
|
||||
e?.preventDefault()
|
||||
|
||||
if QR.req
|
||||
QR.abort()
|
||||
QR.abort() unless QR.req.isUploadFinished
|
||||
return
|
||||
|
||||
if QR.cooldown.seconds
|
||||
@ -823,6 +825,7 @@ QR =
|
||||
upCallbacks:
|
||||
onload: ->
|
||||
# Upload done, waiting for server response.
|
||||
QR.req.isUploadFinished = true
|
||||
QR.req.progress = '...'
|
||||
QR.status()
|
||||
onprogress: (e) ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user