mirror of
https://github.com/gchq/CyberChef
synced 2025-01-09 11:08:47 +00:00
Loading a new file only causes a statechange event once the whole file has loaded
This commit is contained in:
parent
e2161ec934
commit
f7f07f2cb5
1 changed files with 5 additions and 4 deletions
|
@ -58,13 +58,14 @@ InputWaiter.prototype.get = function() {
|
||||||
* @fires Manager#statechange
|
* @fires Manager#statechange
|
||||||
*/
|
*/
|
||||||
InputWaiter.prototype.set = function(input) {
|
InputWaiter.prototype.set = function(input) {
|
||||||
|
const inputText = document.getElementById("input-text");
|
||||||
if (input instanceof File) {
|
if (input instanceof File) {
|
||||||
this.setFile(input);
|
this.setFile(input);
|
||||||
input = "";
|
inputText.value = "";
|
||||||
}
|
} else {
|
||||||
|
inputText.value = input;
|
||||||
document.getElementById("input-text").value = input;
|
|
||||||
window.dispatchEvent(this.manager.statechange);
|
window.dispatchEvent(this.manager.statechange);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue