mirror of
https://github.com/gchq/CyberChef
synced 2025-01-08 10:38:46 +00:00
Scroll I/O areas to the top when switching tabs
This commit is contained in:
parent
b77239fc15
commit
39101610d5
2 changed files with 4 additions and 0 deletions
|
@ -348,6 +348,7 @@ class InputWaiter {
|
|||
|
||||
inputText.style.overflow = "auto";
|
||||
inputText.classList.remove("blur");
|
||||
inputText.scroll(0, 0);
|
||||
|
||||
const lines = inputData.input.length < (this.app.options.ioDisplayThreshold * 1024) ?
|
||||
inputData.input.count("\n") + 1 : null;
|
||||
|
|
|
@ -293,6 +293,7 @@ class OutputWaiter {
|
|||
inputHighlighter.display = "none";
|
||||
|
||||
outputText.value = output.error;
|
||||
outputText.scroll(0, 0);
|
||||
outputHtml.innerHTML = "";
|
||||
} else if (output.status === "baked" || output.status === "inactive") {
|
||||
document.querySelector("#output-loader .loading-msg").textContent = `Loading output ${inputNum}`;
|
||||
|
@ -326,6 +327,7 @@ class OutputWaiter {
|
|||
|
||||
outputText.value = "";
|
||||
outputHtml.innerHTML = output.data.result;
|
||||
outputHtml.scroll(0, 0);
|
||||
|
||||
// Execute script sections
|
||||
scriptElements = outputHtml.querySelectorAll("script");
|
||||
|
@ -358,6 +360,7 @@ class OutputWaiter {
|
|||
inputHighlighter.display = "block";
|
||||
|
||||
outputText.value = Utils.printable(output.data.result, true);
|
||||
outputText.scroll(0, 0);
|
||||
outputHtml.innerHTML = "";
|
||||
|
||||
lines = output.data.result.count("\n") + 1;
|
||||
|
|
Loading…
Reference in a new issue