mirror of
https://github.com/gchq/CyberChef
synced 2024-11-14 16:47:07 +00:00
Merge branch 'fix-testui-race-condition' of https://github.com/zb3/CyberChef into zb3-fix-testui-race-condition
This commit is contained in:
commit
29efd77eaf
2 changed files with 11 additions and 5 deletions
|
@ -241,7 +241,7 @@ class App {
|
||||||
action: "setInput",
|
action: "setInput",
|
||||||
data: {
|
data: {
|
||||||
inputNum: inputNum,
|
inputNum: inputNum,
|
||||||
silent: true
|
silent: false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -507,7 +507,7 @@ class App {
|
||||||
// Input Character Encoding
|
// Input Character Encoding
|
||||||
// Must be set before the input is loaded
|
// Must be set before the input is loaded
|
||||||
if (this.uriParams.ienc) {
|
if (this.uriParams.ienc) {
|
||||||
this.manager.input.chrEncChange(parseInt(this.uriParams.ienc, 10), true);
|
this.manager.input.chrEncChange(parseInt(this.uriParams.ienc, 10), true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output Character Encoding
|
// Output Character Encoding
|
||||||
|
@ -546,8 +546,12 @@ class App {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.autoBakePause = false;
|
this.autoBakePause = false;
|
||||||
|
|
||||||
|
// Dispatch stateChange only if not done by setInput
|
||||||
|
if (this.uriParams.input) {
|
||||||
window.dispatchEvent(this.manager.statechange);
|
window.dispatchEvent(this.manager.statechange);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -217,12 +217,14 @@ class InputWaiter {
|
||||||
* @param {number} chrEncVal
|
* @param {number} chrEncVal
|
||||||
* @param {boolean} [manual=false]
|
* @param {boolean} [manual=false]
|
||||||
*/
|
*/
|
||||||
chrEncChange(chrEncVal, manual=false) {
|
chrEncChange(chrEncVal, manual=false, internal=false) {
|
||||||
if (typeof chrEncVal !== "number") return;
|
if (typeof chrEncVal !== "number") return;
|
||||||
this.inputChrEnc = chrEncVal;
|
this.inputChrEnc = chrEncVal;
|
||||||
this.encodingState = manual ? 2 : this.encodingState;
|
this.encodingState = manual ? 2 : this.encodingState;
|
||||||
|
if (!internal) {
|
||||||
this.inputChange();
|
this.inputChange();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Getter for the input character encoding
|
* Getter for the input character encoding
|
||||||
|
|
Loading…
Reference in a new issue