mirror of
https://github.com/gchq/CyberChef
synced 2025-01-09 19:18:47 +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.style.overflow = "auto";
|
||||||
inputText.classList.remove("blur");
|
inputText.classList.remove("blur");
|
||||||
|
inputText.scroll(0, 0);
|
||||||
|
|
||||||
const lines = inputData.input.length < (this.app.options.ioDisplayThreshold * 1024) ?
|
const lines = inputData.input.length < (this.app.options.ioDisplayThreshold * 1024) ?
|
||||||
inputData.input.count("\n") + 1 : null;
|
inputData.input.count("\n") + 1 : null;
|
||||||
|
|
|
@ -293,6 +293,7 @@ class OutputWaiter {
|
||||||
inputHighlighter.display = "none";
|
inputHighlighter.display = "none";
|
||||||
|
|
||||||
outputText.value = output.error;
|
outputText.value = output.error;
|
||||||
|
outputText.scroll(0, 0);
|
||||||
outputHtml.innerHTML = "";
|
outputHtml.innerHTML = "";
|
||||||
} else if (output.status === "baked" || output.status === "inactive") {
|
} else if (output.status === "baked" || output.status === "inactive") {
|
||||||
document.querySelector("#output-loader .loading-msg").textContent = `Loading output ${inputNum}`;
|
document.querySelector("#output-loader .loading-msg").textContent = `Loading output ${inputNum}`;
|
||||||
|
@ -326,6 +327,7 @@ class OutputWaiter {
|
||||||
|
|
||||||
outputText.value = "";
|
outputText.value = "";
|
||||||
outputHtml.innerHTML = output.data.result;
|
outputHtml.innerHTML = output.data.result;
|
||||||
|
outputHtml.scroll(0, 0);
|
||||||
|
|
||||||
// Execute script sections
|
// Execute script sections
|
||||||
scriptElements = outputHtml.querySelectorAll("script");
|
scriptElements = outputHtml.querySelectorAll("script");
|
||||||
|
@ -358,6 +360,7 @@ class OutputWaiter {
|
||||||
inputHighlighter.display = "block";
|
inputHighlighter.display = "block";
|
||||||
|
|
||||||
outputText.value = Utils.printable(output.data.result, true);
|
outputText.value = Utils.printable(output.data.result, true);
|
||||||
|
outputText.scroll(0, 0);
|
||||||
outputHtml.innerHTML = "";
|
outputHtml.innerHTML = "";
|
||||||
|
|
||||||
lines = output.data.result.count("\n") + 1;
|
lines = output.data.result.count("\n") + 1;
|
||||||
|
|
Loading…
Reference in a new issue