* @since 3.2
*/
_openEditorAfterUpload: function(data) {
- if (data.upload === _upload && !data.isMultiFileUpload) {
+ if (data.upload === _upload && !data.isMultiFileUpload && !_upload.hasPendingUploads()) {
var keys = Object.keys(data.media);
if (keys.length) {
* @since 3.2
*/
_openEditorAfterUpload: function(data) {
- if (data.upload === this._upload && !data.isMultiFileUpload) {
+ if (data.upload === this._upload && !data.isMultiFileUpload && !this._upload.hasPendingUploads()) {
var keys = Object.keys(data.media);
if (keys.length) {
return uploadId;
},
+ /**
+ * Returns true if there are any pending uploads handled by this
+ * upload manager.
+ *
+ * @return {boolean}
+ * @since 3.2
+ */
+ hasPendingUploads: function() {
+ for (var uploadId in this._fileElements) {
+ for (var i in this._fileElements[uploadId]) {
+ var progress = elByTag('PROGRESS', this._fileElements[uploadId][i]);
+ if (progress.length === 1) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ },
+
/**
* Uploads the given file blob.
*