Skip to content

Commit

Permalink
Fixed issue #16194: file upload disables other clicks.
Browse files Browse the repository at this point in the history
After loading the upload frame inside the modal, 'relevance:on' event handlers are lost.
Calling triggerEmRelevance() when closing the modal fixes the issue.

Contains also fix for #16549: Error message is shown while trying to delete and reupload file using File upload
  • Loading branch information
gabrieljenik committed Aug 17, 2020
1 parent 6673343 commit 09da665
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
11 changes: 6 additions & 5 deletions assets/packages/questions/upload/build/uploadquestion.js
Expand Up @@ -703,6 +703,7 @@
toDeleteFlag = true; // Fix IE mixed content issue

iframe.src = "javascript:'<html></html>';";
removeNode(iframe);
});
},

Expand All @@ -726,7 +727,10 @@
} // sending request


var iframe = this._createIframe();
var iframe = this._createIframe(); // Get response from iframe and fire onComplete event when ready


this._getResponse(iframe, file);

var form = this._createForm(iframe); // assuming following structure
// div -> input type='file'
Expand All @@ -741,10 +745,7 @@
removeNode(form);
form = null;
removeNode(this._input);
this._input = null; // Get response from iframe and fire onComplete event when ready

this._getResponse(iframe, file); // get ready for next request

this._input = null; // get ready for next request

this._createInput();
}
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions assets/packages/questions/upload/src/ajaxupload.js
Expand Up @@ -636,6 +636,7 @@

// Fix IE mixed content issue
iframe.src = "javascript:'<html></html>';";
removeNode(iframe);
});
},
/**
Expand All @@ -658,6 +659,10 @@

// sending request
var iframe = this._createIframe();

// Get response from iframe and fire onComplete event when ready
this._getResponse(iframe, file);

var form = this._createForm(iframe);

// assuming following structure
Expand All @@ -674,9 +679,6 @@
removeNode(form); form = null;
removeNode(this._input); this._input = null;

// Get response from iframe and fire onComplete event when ready
this._getResponse(iframe, file);

// get ready for next request
this._createInput();
}
Expand Down

0 comments on commit 09da665

Please sign in to comment.