Loading a new file only causes a statechange event once the whole file has loaded

This commit is contained in:
n1474335 2017-12-27 15:52:38 +00:00
parent e2161ec934
commit f7f07f2cb5

View File

@ -58,13 +58,14 @@ InputWaiter.prototype.get = function() {
* @fires Manager#statechange
*/
InputWaiter.prototype.set = function(input) {
const inputText = document.getElementById("input-text");
if (input instanceof File) {
this.setFile(input);
input = "";
inputText.value = "";
} else {
inputText.value = input;
window.dispatchEvent(this.manager.statechange);
}
document.getElementById("input-text").value = input;
window.dispatchEvent(this.manager.statechange);
};